I tried this select query with an IF statement but it didn't work,
Have you any solution
thank you
Select IF(field1 = 1, \'Oui\', IF(field2 != 0 and field1 = 0,\'En
cours\', IF(field2 = 0 and field1 = 0,\'non\', \'non\'),\'non\')) as Payed
from myTable
error message :
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 '),'non')) as Payed
Aucun commentaire:
Enregistrer un commentaire