Come si scrive un'istruzione IF ELSE in una query MySQL?
Qualcosa come questo:
mysql_query("...(irrelevant code).. IF(action==2&&state==0){state=1}");
Quindi nel mio array dovrei essere in grado di farlo:
$row['state']
//this should equal 1, the query should not change anything in the database,
//just the variable for returning the information