Hi! I'm trying to execute two SQL statements in one mysql_query.
$mySql = mysql_query("SELECT itemid, points FROM items WHERE id='1' UPDATE accounts SET userpoints = '1000'");
Is this possible? Thanks!
Hi! I'm trying to execute two SQL statements in one mysql_query.
$mySql = mysql_query("SELECT itemid, points FROM items WHERE id='1' UPDATE accounts SET userpoints = '1000'");
Is this possible? Thanks!
You can only execute one query in mysql_query
(even if you seperate the queries with the semicolon terminator).
You have to call them seperately (although this guy has a method to automate that).
I wouldn't try doing that since you won't be able to exploit the results from the different queries (returned values, mysql_insert_id(), ...)