Re: Another Pear::DB question
| From: | Chris Lacy-Hulbert | Date: | Sat, 20 Sep 2003 14:41:36 +0000 |
| Subject: | Re: Another Pear::DB question | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-7936@lists.php.net to get a copy of this message | ||
> But if you are going to be MySQL specific, why not just use the mysql
> interface directly? I don't see the point if making a half-arsed
> attempt at DBMS independence.
I tend to agree with that. Also, DB does offer support for sequences -
even quite craftily in MySQL (albeit a little bit fake), so you can
select the upcoming id with $db->nextId('tablename'), then explicitly
provide the id in your insert statment - and return it as your last
insert IYSWIM.
hth
Christo
(Bob: apologies for the stray reply)
--
,-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~,
| Chris Lacy-Hulbert BEng(Hons) |
| Technical Director, Spiration ltd |
| <t> 01793 435 254 <e> chris@spiration.co.uk |
'-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-'