I tried this and it gave me an error.

Will this

$id = mysql_insert_id();

allow me to pull out the id?


--
Cross Walk Central
www.crosswalkcentral.net
Support Center
Your Web Hosting Community!

"Cynic" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> At 19:19 8/19/2001, CrossWalkCentral wrote the following:
> --------------------------------------------------------------
> >I have a script where I submit user data to the database in my script I
need
> >to get the id  # how can I do this w/o creating a query that does the
> >following considering that user could have 10 other entires.
>
> mysql_query("insert into ...");
> $id = mysql_insert_id();
>
>
> >// Request info
> >$result = mysql_query(
> >"SELECT * FROM supportsys WHERE email = $email");
> >if (!$result) {
> >echo("<P>Error performing query: " .
> >mysql_error() . "</P>");
> >exit();
> >}
> >
> >
> >I basicly need to get the id$ of the record just entered
> >--
> >Cross Walk Central
> >www.crosswalkcentral.net
> >Support Center
> >Your Web Hosting Community!
> >
> >
> >
> >
> >--
> >PHP Database Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
> ------end of quote------
>
>
> [EMAIL PROTECTED]
> -------------
> And the eyes of them both were opened and they saw that their files
> were world readable and writable, so they chmoded 600 their files.
>     - Book of Installation chapt 3 sec 7
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to