How can i do record level locking using PHP?
version that i am using
PHP version=4.3.1
Mysql version=4.0.22-nt
I have problem in taking the record level locking.
When i take the lock on MYSQL command line . it works
mysql>begin work;
mysql>select * from tblemp where empid=1 for update;
Now no other user is able to update the record of empid=1.
untill i run the command
mysql>commit;
but when i tried this thing by PHP code. it does not work.
One more thing, how can i use the same link that i have created on other php page.I do not want to creat link again and again for every new php page by code
$link = mysql_connect($Server,$Usr,$Pwd);
i want $link as global and can be user directly on any page if once is created.
i have also tried by making the $link to global variable. but not working
Help me out from these problems
Subject
Views
Written By
Posted
5645
January 03, 2005 04:15PM
2917
January 06, 2005 12:12PM
2833
January 10, 2005 05:05PM
3030
January 12, 2005 01:37AM
2796
January 12, 2005 05:23PM
2858
January 13, 2005 09:59AM
2835
January 14, 2005 07:33AM
How can i do record level locking using PHP?
3057
February 18, 2005 04:45AM
4249
February 19, 2005 01:01AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.