REWRITE OF TVAJAX classreference

';
SELECT NOW()+INTERVAL 15 MINUTE
	--> 2024-11-21 11:09:14              (Database=)
SELECT xxprogram.id as programid, start, end,contentid,title,
CONCAT(LOWER(DATE_FORMAT(start,'%l:%i %p - ')),DAYNAME(start), DATE_FORMAT(start,' %M %D')) as info
FROM `xxprogram` ,xxprogramcontent
WHERE contentid=xxprogramcontent.id
AND channel=1 AND contentid<1000
 AND end < '2024-11-21 11:09:14' order by end DESC

	--> 1601241              (Database=)
      

1 [0] => 'request was for previous' [programid] => '1601241' [start] => '2024-11-21 09:00:00' [end] => '2024-11-21 10:00:00' [contentid] => '129' [title] => 'Vinyasa Flow' [info] => '9:00 am - Thursday November 21st'

NEW FOR OTHER

SELECT xxprogram.id as otherid, title as othertitle
FROM `xxprogram` ,xxprogramcontent
WHERE channel=1 AND contentid<1000
AND contentid=xxprogramcontent.id
 AND '2024-11-21 11:09:14' BETWEEN start-INTERVAL 15 MINUTE AND end

	--> 1601242              (Database=)
      

[0] => 'REQUEST WAS previous ==>>THIS IS previous OTHER -- THIS IS OTHER CLASS' [otherid] => '1601242' [othertitle] => 'Megans Method Yoga'
SELECT id FROM `xxpersoncontent` WHERE personid=777 and programid=1601241 AND inperson
	-->               (Database=)
SELECT id as othersignin FROM `xxpersoncontent` WHERE personid=777 and programid=1601242 AND inperson
	-->               (Database=)
      

[signedin] => '' [title] => 'Vinyasa Flow' [info] => '9:00 am - Thursday November 21st' [programid] => '1601241' [classid] => '129' [querytype] => '2' [resulttype] => '' [requesttype] => 'previous' [otherid] => '1601242' [othersignedin] => '' [othertitle] => 'Megans Method Yoga'
SELECT id, start, end
FROM `xxprogram`
WHERE channel=1 AND contentid<1000
 AND end < '2024-11-21 11:09:14' order by end DESC

	--> 1601241              (Database=)
SELECT contentid
FROM `xxprogram`
WHERE channel=1 AND contentid<1000
 AND end < '2024-11-21 11:09:14' order by end DESC

	--> 129              (Database=)
SELECT title
FROM `xxprogram` ,xxprogramcontent
WHERE contentid=xxprogramcontent.id
AND channel=1 AND contentid<1000
 AND end < '2024-11-21 11:09:14' order by end DESC

	--> Vinyasa Flow              (Database=)
SELECT
CONCAT(LOWER(DATE_FORMAT(start,'%l:%i %p - ')),DAYNAME(start), DATE_FORMAT(start,' %M %D'))
FROM `xxprogram` ,xxprogramcontent
WHERE contentid=xxprogramcontent.id
AND channel=1 AND contentid<1000
 AND end < '2024-11-21 11:09:14' order by end DESC

	--> 9:00 am - Thursday November 21st              (Database=)
SELECT xxprogram.id, start, end,contentid,title,
CONCAT(LOWER(DATE_FORMAT(start,'%l:%i %p - ')),DAYNAME(start), DATE_FORMAT(start,' %M %D')) as info
FROM `xxprogram` ,xxprogramcontent
WHERE contentid=xxprogramcontent.id
AND channel=1 AND contentid<1000
 AND end < '2024-11-21 11:09:14' order by end DESC

	--> 1601241              (Database=)
      

[id] => '1601241' [start] => '2024-11-21 09:00:00' [end] => '2024-11-21 10:00:00' [contentid] => '129' [title] => 'Vinyasa Flow' [info] => '9:00 am - Thursday November 21st'
SELECT id as otherid
FROM `xxprogram`
WHERE channel=1 AND contentid<1000
 AND '2024-11-21 11:09:14' BETWEEN start-INTERVAL 15 MINUTE and end

	--> 1601242              (Database=)
SELECT title as  othertitle
FROM `xxprogram` ,xxprogramcontent
WHERE contentid=xxprogramcontent.id
AND xxprogram.id=1601242;

	--> Megans Method Yoga              (Database=)
SELECT id FROM `xxpersoncontent` WHERE personid=777 and programid=1601241 AND inperson
	-->               (Database=)
SELECT id as othersignin FROM `xxpersoncontent` WHERE personid=777 and programid=1601242 AND inperson
	-->               (Database=)
      

[signedin] => '' [title] => 'Vinyasa Flow' [info] => '9:00 am - Thursday November 21st' [programid] => '1601241' [classid] => '129' [querytype] => '2' [resulttype] => 'found current or previous' [requesttype] => 'previous' [otherid] => '1601242' [othersignedin] => '' [othertitle] => 'Megans Method Yoga'