I want to lock a table so that other pages can not access the table in
between the data pull and date update.

But it would seem it locks the *same* page from updating (but not from
reading thankfully).

PHP:
----------------------------------------------------------------------------
----
mysql_query('LOCK TABLES ConfigVars READ');
$result = mysql_result( mysql_query('SELECT Counter, AffilateIDcode FROM
ConfigVars'), 0);
...
mysql_query('UPDATE ConfigVars SET Counter = (Counter + '."$increment)");
mysql_query('UNLOCK TABLES');
----------------------------------------------------------------------------
----

Am I right? If I am, what can be done to fix this problem?



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to