Wie schreibe IF ELSE-Anweisung in eine MySQL-Abfrage

Wie Schreibe ich eine IF-ELSE-Anweisung in einer MySQL-Abfrage?

Etwas wie dieses:

mysql_query("...(irrelevant code).. IF(action==2&&state==0){state=1}");

Dann nach unten in mein array sollte ich in der Lage, dies zu tun:

 $row['state'] 
//this should equal 1, the query should not change anything in the database, 
//just the variable for returning the information

InformationsquelleAutor der Frage Dylan Cross | 2012-01-06

Schreibe einen Kommentar