jlimited
11-18-2006, 10:28 PM
Hello,
My mysql table is setup as the following:
billingid (Primary Key, auto_increment)
userid
billingdate
invoice
I have a script that is inserting data into a mysql database table.
mysql_query("INSERT INTO billing SET userid='$userid', billingdate='$billingdate', invoice='$invoice'");
What I want to know is if there is a way to return the billingid value for the row that is inserted without querying the database for the record?
For Example:
mysql_query("INSERT INTO billing SET userid='$userid', billingdate='$billingdate', invoice='$invoice' RETURN billingid");
Thanks
jlimited
My mysql table is setup as the following:
billingid (Primary Key, auto_increment)
userid
billingdate
invoice
I have a script that is inserting data into a mysql database table.
mysql_query("INSERT INTO billing SET userid='$userid', billingdate='$billingdate', invoice='$invoice'");
What I want to know is if there is a way to return the billingid value for the row that is inserted without querying the database for the record?
For Example:
mysql_query("INSERT INTO billing SET userid='$userid', billingdate='$billingdate', invoice='$invoice' RETURN billingid");
Thanks
jlimited