Re: LOCKS???

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On Nov 27, 2016, at 11:33 PM, Paul M Foster <paulf@xxxxxxxxxxxxxxxxx> wrote:
> -snip-
> 
> Read what Tedd wrote again. The second script is reading and WRITING to
> the tables.
> 
> Paul
> 
> -- 
> Paul M. Foster
> http://noferblatz.com
> http://quillandmouse.com

Thanks Paul — you are correct.

As to what engine I am running, which one do I need to get LOCK TABLES  to work?

I have found and tested transactions that only work in a InnoDB engine, but I did not read anything about what engine is required for LOCKS to work. Is that an issue?

To restate the current problem.

I have two scripts accessed by two different computers (thus with different session ID’s).

a) Computer One runs the first script which executes a LOCK --

$query = "LOCK TABLES $table WRITE”;

— and then writes to the table. This is confirmed by inspecting the table via phpMyAdmin.

b) Computer two then runs the second script which only executes an UPDATE --:

$query = "UPDATE $table SET i='$i' WHERE id=1 “;

— and the value of i in $table is changed. This is also confirmed by inspecting the table via phpMyAdmin.

This experiment demonstrates that LOCK TABLES does not work for me.

My question is”Why?”

Cheers and thanks to all who answer.

tedd

_______________
tedd sperling
tedd.sperling@xxxxxxxxx






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





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux