I have this code that i tried running it on my phpmyadmin it works fine ,but when i use it on my php code to query its not working.What could be the issue?
SELECT * FROM `roombook` ORDER BY (CASE stat
WHEN 'Checked in' THEN 1
WHEN 'Booked' THEN 2
WHEN 'Deposit Confirmation' THEN 3
WHEN 'Email/phone' THEN 4
WHEN 'Checked Out' THEN 5
ELSE 'Cancelled' END) ASC, stat ASC