MySQL Forums
Forum List  »  Newbie

Posted by: Wouter Monkhorst
Date: August 30, 2004 09:06AM

Hi there,

I'm trying to use the function mysql_insert_id(), but don't quite understand the manual on the syntax....

can somebody give me a working example??

this is how far I got:

$sql = "INSERT projects SET name='$rvar_name'";
$pro_res = mysql_query($sql);
$id = mysql_insert_id($pro_res);

resulting in the following error message:
Warning: mysql_insert_id(): supplied argument is not a valid MySQL-Link resource in ...

The manual syntax says: mysql_insert_id(MYSQL *mysql) but what does the 'MYSQL *mysql' mean??

thanks! Wouter

Options: ReplyQuote

Written By
August 30, 2004 09:06AM
August 30, 2004 09:27AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.