RE: [PHP] mysql_insert_id()
| From: | Sam Masiello | Date: | Wed, 24 Jan 2001 21:42:10 +0000 |
| Subject: | RE: [PHP] mysql_insert_id() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-36487@lists.php.net to get a copy of this message | ||
You probably stated this in your previous post, but what is the result from
your call to mysql() ? Is this call failing so that when you get to
mysql_insert_id(), the id doesnt exist?
HTH
Sam Masiello
Systems Analyst
Chek.Com
(716) 853-1362 x289
smasiello@chekinc.com
-----Original Message-----
From: Boget, Chris [mailto:Chris.Boget@wild.net]
Sent: Wednesday, January 24, 2001 4:20 PM
To: 'Sam Masiello'; Php (E-mail)
Subject: RE: [PHP] mysql_insert_id()
> When you are using mysql_insert_id, you don't want to pass it
> the result of your previous SQL statement as in:
> $result = mysql"mydb", "My SQL statement", $my_connect) ;
> $last_id = mysql_insert_id($result)
This is what it sounds like it's looking for in the documentation. It
could be just how I'm reading it. :p
> Rather, you want to pass it the link identifier from your
> mysql_connect like:
> $result = mysql("mydb", "My SQL statement", $my_connect) ;
> $last_id = mysql_insert_id($my_connect)
Tried this, too, with no luck. :( I'm using mysql_pconnect() and
mysql_connect() and neither seems to help my situation.
Chris