REWRITE OF TVAJAX classreference

';
SELECT NOW()+INTERVAL 15 MINUTE
	--> 2024-12-13 14:55:42              (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-12-13 14:55:42' order by end DESC

	--> 1615347              (Database=)
      

1 [0] => 'request was for previous' [programid] => '1615347' [start] => '2024-12-13 12:00:00' [end] => '2024-12-13 13:15:00' [contentid] => '3' [title] => '50+ Yoga' [info] => '12:00 pm - Friday December 13th'

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-12-13 14:55:42' BETWEEN start-INTERVAL 15 MINUTE AND end

	-->               (Database=)
      

[0] => 'REQUEST WAS previous ==>>THIS IS previous OTHER -- THIS IS OTHER CLASS' [1] => ''
	SELECT xxprogram.id as otherid, title as othertitle
	FROM `xxprogram` ,xxprogramcontent
	WHERE channel=1 AND contentid<1000
	AND contentid=xxprogramcontent.id
	 AND start>'2024-12-13 13:15:00' order by start limit 1
	
	--> 1615660              (Database=)
      

[0] => 'Other ClaSS failed >>THIS IS previous OTHER -- THIS IS OTHER CLASS' [otherid] => '1615660' [othertitle] => 'Anahata Yoga'
SELECT id FROM `xxpersoncontent` WHERE personid=777 and programid=1615347 AND inperson
	-->               (Database=)
SELECT id as othersignin FROM `xxpersoncontent` WHERE personid=777 and programid=1615660 AND inperson
	-->               (Database=)
      

[signedin] => '' [title] => '50+ Yoga' [info] => '12:00 pm - Friday December 13th' [programid] => '1615347' [classid] => '3' [querytype] => '2' [resulttype] => '' [requesttype] => 'previous' [otherid] => '1615660' [othersignedin] => '' [othertitle] => 'Anahata Yoga'
SELECT id, start, end
FROM `xxprogram`
WHERE channel=1 AND contentid<1000
 AND end < '2024-12-13 14:55:42' order by end DESC

	--> 1615347              (Database=)
SELECT contentid
FROM `xxprogram`
WHERE channel=1 AND contentid<1000
 AND end < '2024-12-13 14:55:42' order by end DESC

	--> 3              (Database=)
SELECT title
FROM `xxprogram` ,xxprogramcontent
WHERE contentid=xxprogramcontent.id
AND channel=1 AND contentid<1000
 AND end < '2024-12-13 14:55:42' order by end DESC

	--> 50+ Yoga              (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-12-13 14:55:42' order by end DESC

	--> 12:00 pm - Friday December 13th              (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-12-13 14:55:42' order by end DESC

	--> 1615347              (Database=)
      

[id] => '1615347' [start] => '2024-12-13 12:00:00' [end] => '2024-12-13 13:15:00' [contentid] => '3' [title] => '50+ Yoga' [info] => '12:00 pm - Friday December 13th'
SELECT id as otherid
FROM `xxprogram`
WHERE channel=1 AND contentid<1000
 AND '2024-12-13 14:55:42' BETWEEN start-INTERVAL 15 MINUTE and end

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

	-->               (Database=)
SELECT id FROM `xxpersoncontent` WHERE personid=777 and programid=1615347 AND inperson
	-->               (Database=)
SELECT id as othersignin FROM `xxpersoncontent` WHERE personid=777 and programid= AND inperson
	-->               (Database=)
      

[signedin] => '' [title] => '50+ Yoga' [info] => '12:00 pm - Friday December 13th' [programid] => '1615347' [classid] => '3' [querytype] => '2' [resulttype] => 'found current or previous' [requesttype] => 'previous' [otherid] => '' [othersignedin] => '' [othertitle] => ''