You all tell me which is more efficient, temp table or duplicating the function. The function is below. It goes in the big, ugly, scheduler query and needs to returned in the SELECT list and used in JOINs for recorded and oldrecorded.
time to learn how to use EXPLAIN... it's VERY useful in building your mysql queries.
-Chris
QString progfindid = QString( "(CASE record.type " " WHEN %1 " " THEN to_days(date_sub(program.starttime, interval " " date_format(record.findtime, '%H:%i') hour_minute)) " " WHEN %2 " " THEN floor((to_days(date_sub(program.starttime, interval " " date_format(record.findtime, '%H:%i') hour_minute)) - " " to_days(record.findtime))/7) * 7 + to_days(record.findtime) " " ELSE 0 " " END) ") .arg(kFindDailyRecord) .arg(kFindWeeklyRecord);
David
------------------------------------------------------------------------
_______________________________________________ mythtv-dev mailing list [email protected] http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
_______________________________________________ mythtv-dev mailing list [email protected] http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
