[UPHPU] returning MySQL
gshipley at gmail.com
Tue Feb 22 19:13:11 MST 2005
Someone correct me if I am wrong here but that will only return the
last insert id for that connection. So if you have some type of
connection pooling or caching system in place, you might not get the
number you are expecting.
On Tue, 22 Feb 2005 16:37:53 -0700, Timothy Humphrey
<timothy.humphrey at gmail.com> wrote:
> How would one return the "auto increment" number from a newly created
> record automatically?
> For example:
> $record = "INSERT INTO database VALUES ('', '$var_1','$var_2', '1',
> $result = $db->query($record);
> I would want to create another variable for the auto increment number
> that the database assigned to that new entry.
> Hope that makes since.
> UPHPU mailing list
> UPHPU at uphpu.org
> IRC: #uphpu on irc.freenode.net
More information about the UPHPU