I'm using table locking (because even the official mysql manual doesnt tell you how to do row locking)
the problem is it's not letting me update a table.
first of all i lock the table like this:
mysql_query("lock tables event write");
mysql_query("lock tables event read");
i then do several select queries, all of which work
i then try to do an update on the event table like this:
$updateplaces = mysql_query("UPDATE event SET available_places = '$available_places' WHERE event_id = '$event_id'");
//place seized (or aborting due to DB error), unlock
if ($updateplaces == false)
return "ERROR: Could not update spare places for this event";
At which point it exists with the error i defined above because $updateplaces is == false.
If I remove the locking code this query works fine.
Anyone know why this is happening?
Table types are InnoDB on MySQL 4.1
[edited by: bluedalmatian at 6:34 pm (utc) on April 7, 2005]