slyfox
09-15-2005, 06:05 PM
Hi Peoples
Can anyone tell me what's wrong with this mysql query..?
SELECT item_num, description, status, DATE_FORMAT(date_due, '%c/%e/%Y') as datedue, priority,
IF(current_date() > date_due) THEN 'X' ELSE '' END IF as flag FROM item
WHERE user_id = 3 GROUP BY date_due, description, priority, item_num, status, flag
ORDER BY date_due,priority asc
Here is the error I get:
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 ') THEN 'X' ELSE '' END IF as flag FROM item WHERE user_id = 3 G
Any help please
Thanks
Can anyone tell me what's wrong with this mysql query..?
SELECT item_num, description, status, DATE_FORMAT(date_due, '%c/%e/%Y') as datedue, priority,
IF(current_date() > date_due) THEN 'X' ELSE '' END IF as flag FROM item
WHERE user_id = 3 GROUP BY date_due, description, priority, item_num, status, flag
ORDER BY date_due,priority asc
Here is the error I get:
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 ') THEN 'X' ELSE '' END IF as flag FROM item WHERE user_id = 3 G
Any help please
Thanks