note 84398 added to function.mysql-insert-id
| From: | Susie at osu1 dot php dot net | Date: | Sat, 12 Jul 2008 14:38:52 +0000 |
| Subject: | note 84398 added to function.mysql-insert-id | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-141423@lists.php.net to get a copy of this message | ||
I have never used adodb, but this page talks about the GenID function:
"When you create records, you need to generate unique id's for each record. There are two
common techniques: (1) auto-incrementing columns and (2) sequences.
Auto-incrementing columns are supported by MySQL, Sybase and Microsoft Access and SQL Server.
However most other databases do not support this feature. So for portability, you have little choice
but to use sequences. Sequences are special functions that return a unique incrementing number every
time you call it, suitable to be used as database keys. In ADOdb, we use the GenID( ) function"
taken from
http://phplens.com/lens/adodb/tips_portable_sql.htm
It sounds like you pass the genid function a sequence name, and it returns the next increment number
for that name.
It seems like that would solve the problem.
Here's some general info about adodb:
http://adodb.sourceforge.net/
----
Server IP: 208.69.120.35
Probable Submitter: 24.60.118.213
----
Manual Page -- http://www.php.net/manual/en/function.mysql-insert-id.php
Edit -- https://master.php.net/note/edit/84398
Del: integrated -- https://master.php.net/note/delete/84398/integrated
Del: useless -- https://master.php.net/note/delete/84398/useless
Del: bad code -- https://master.php.net/note/delete/84398/bad+code
Del: spam -- https://master.php.net/note/delete/84398/spam
Del: non-english -- https://master.php.net/note/delete/84398/non-english
Del: in docs -- https://master.php.net/note/delete/84398/in+docs
Del: other reasons-- https://master.php.net/note/delete/84398
Reject -- https://master.php.net/note/reject/84398
Search -- https://master.php.net/manage/user-notes.php