PHP/MySQL/Row Locking

From: Date: Fri, 01 Mar 2002 15:38:54 +0000
Subject: PHP/MySQL/Row Locking
Groups: php.general 
Request: Send a blank email to php-general+get-86776@lists.php.net to get a copy of this message
I have MySQL Max 4.0.1-2 alpha installed on my server. I am using the PHP PEAR DB interface to access it. The version of PHP is the latest, 4.1.2. My question is -- how do I implement the locking of rows through PEAR? I am aiming to support transactions in my application. From what I understand, implementing requires persistent database connections. With my PEAR experience so far, I've only done the basic steps of interfacing with the database. I do this in separate functions -- one for getting the data and displaying it in forms, and one for saving the data. In each function, a database connection is made and then disconnected. Hence the connections are not persistent. Because this uses more than one function, does this approach make locking impossible, and hence necessitating a rewrite of the database portion of my app? Perhaps someone knows of a web page that addresses PEAR/DB locking, or could share some tips? Thanks, -- Aaron Gould agould@partscanada.com Web Developer

« previous php.general (#86776) next »