forked from HPR/hpr_generator
		
	Convert correspondent page queries from SQLite to MySQL
This commit is contained in:
		| @@ -5,7 +5,8 @@ | ||||
| <!--% query_hpr_show_count = DBI.prepare(' | ||||
| 		SELECT id | ||||
| 		FROM eps | ||||
| 		WHERE eps.hostid = ? ') | ||||
| 		WHERE eps.hostid = ?  | ||||
| 		') | ||||
| %--> | ||||
| <!--% query_hpr_shows = DBI.prepare(' | ||||
| 		SELECT  | ||||
| @@ -21,8 +22,9 @@ | ||||
| 	FROM eps  | ||||
| 	INNER JOIN hosts ON eps.hostid = hosts.hostid  | ||||
| 	INNER JOIN miniseries ON eps.series = miniseries.id | ||||
| 	WHERE hosts.hostid = ? AND eps.date < date(\'now\', \'+1 days\')  | ||||
| 	ORDER BY eps.id + 0 DESC	') | ||||
| 	WHERE hosts.hostid = ? AND eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)  | ||||
| 	ORDER BY eps.id DESC	 | ||||
| 	') | ||||
| %--> | ||||
| <!--% hpr_shows_to_count = query_hpr_show_count.execute(id); %--> | ||||
| <!--% hpr_shows = query_hpr_shows.execute(id); %--> | ||||
| @@ -33,8 +35,9 @@ | ||||
|  | ||||
| <!--% query_twat_show_count = DBI.prepare(' | ||||
| 		SELECT id | ||||
| 		FROM twat_eps AS \'eps\' | ||||
| 		WHERE eps.hostid = ? ') | ||||
| 		FROM twat_eps AS eps | ||||
| 		WHERE eps.hostid = ? | ||||
| 		') | ||||
| %--> | ||||
| <!--% query_twat_shows = DBI.prepare(' | ||||
| 		SELECT  | ||||
| @@ -51,7 +54,7 @@ | ||||
| 	INNER JOIN hosts ON eps.hostid = hosts.hostid  | ||||
| 	INNER JOIN miniseries ON eps.series = miniseries.id | ||||
| 	WHERE hosts.hostid = ? | ||||
| 	ORDER BY eps.id + 0 DESC | ||||
| 	ORDER BY eps.id DESC | ||||
| 	') | ||||
| %--> | ||||
| <!--% twat_shows_to_count = query_twat_show_count.execute(id); %--> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user