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

From: Date: Wed, 09 Jul 2003 15:16:06 +0000
Subject: Re: PEAR::DB's nextId() and MySQL's LOCK TABLES
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-6541@lists.php.net to get a copy of this message
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 El Martes, 8 de Julio de 2003 13:30, Keijo Lehto escribió: Just call nextId before locking the table foo. Why do you want it the other way ? Regards, Xabi. > 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 - -- GnuPG signed and encrypted email preferred http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x093F978B Key fingerprint = B3C5 0C7B 1587 071C 3D9C 545A 72FC 0234 093F 978B -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE/DDG/cvwCNAk/l4sRAv80AJsHWOsSHpi4uclVnccb9KvW5OytBQCgnwbd srh670hBpOROXTtYIdh7YTE= =5b4c -----END PGP SIGNATURE-----

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