PEAR::DB's nextId() and MySQL's LOCK TABLES

From: Date: Tue, 08 Jul 2003 11:30:45 +0000
Subject: PEAR::DB's nextId() and MySQL's LOCK TABLES
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-6528@lists.php.net to get a copy of this message
Hi, I can't seem to get things work when locking tables with $db->$query('LOCK TABLES foo WRITE') and using PEAR::DB's nextId() method for getting the sequences work. The result I get is an error message claiming I haven't locked all the required tables. The table it complains seems to be part of PEAR::DB's inside logic, foo_seq in this case if I recall correctly. It could be possible to always manually lock all the possible tables the PEAR::DB requires BUT I don't really understand why I should be responsible of this since I'm using PEAR::DB to separate database code as much as possible from the actual business logic. The question is: is there a fluent way of gettings things work without having to embed PEAR-specific code to my data objects? Regards, Keijo

« previous php.pear.general (#6528) next »