246 visite(s)

Erreur MySQL : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OR ce.category_id = 4959) GROUP BY d.page_id ORDER BY d.date' at line 6
Requête originale : SELECT DISTINCT d.date, d.page_id, b.titre, b.nav_url, a.image, a.icon FROM wagaia_multiple_dates d left join wagaia_pages_data b on d.page_id = b.page_id LEFT JOIN wagaia_pages a ON d.page_id = a.id LEFT JOIN wagaia_categories_event ce ON ce.page_id = a.id WHERE IFNULL(a.temp, 0) = 0 AND d.status = 1 AND a.type = 'event' AND d.date > CURDATE() AND (ce.category_id = 2740 OR ce.category_id = OR ce.category_id = 4959) GROUP BY d.page_id ORDER BY d.date
#0  Wagaia\Database->error(SELECT DISTINCT d.date, d.page_id, b.titre, b.nav_url, a.image, a.icon
								FROM wagaia_multiple_dates d left join wagaia_pages_data b on d.page_id = b.page_id 
								LEFT JOIN wagaia_pages a ON d.page_id = a.id 
								LEFT JOIN wagaia_categories_event ce ON ce.page_id = a.id
								WHERE IFNULL(a.temp, 0) = 0 AND d.status = 1 AND a.type = 'event' AND d.date > CURDATE()
								AND (ce.category_id = 2740 OR ce.category_id =  OR ce.category_id = 4959)
								GROUP BY d.page_id ORDER BY d.date, ) called at [/home/cmcasmar/www/Wagaia/Classes/Database.php:242]
#1  Wagaia\Database->query(SELECT DISTINCT d.date, d.page_id, b.titre, b.nav_url, a.image, a.icon
								FROM wagaia_multiple_dates d left join wagaia_pages_data b on d.page_id = b.page_id 
								LEFT JOIN wagaia_pages a ON d.page_id = a.id 
								LEFT JOIN wagaia_categories_event ce ON ce.page_id = a.id
								WHERE IFNULL(a.temp, 0) = 0 AND d.status = 1 AND a.type = 'event' AND d.date > CURDATE()
								AND (ce.category_id = 2740 OR ce.category_id =  OR ce.category_id = 4959)
								GROUP BY d.page_id ORDER BY d.date) called at [/home/cmcasmar/www/Wagaia/Classes/Database.php:215]
#2  Wagaia\Database->pushArray() called at [/home/cmcasmar/www/Wagaia/Classes/Database.php:199]
#3  Wagaia\Database->select(SELECT DISTINCT d.date, d.page_id, b.titre, b.nav_url, a.image, a.icon
								FROM wagaia_multiple_dates d left join wagaia_pages_data b on d.page_id = b.page_id 
								LEFT JOIN wagaia_pages a ON d.page_id = a.id 
								LEFT JOIN wagaia_categories_event ce ON ce.page_id = a.id
								WHERE IFNULL(a.temp, 0) = 0 AND d.status = 1 AND a.type = 'event' AND d.date > CURDATE()
								AND (ce.category_id = 2740 OR ce.category_id =  OR ce.category_id = 4959)
								GROUP BY d.page_id ORDER BY d.date) called at [/home/cmcasmar/www/Wagaia/views/article.php:52]
#4  include(/home/cmcasmar/www/Wagaia/views/article.php) called at [/home/cmcasmar/www/index.php:318]