Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

last_insert_id() command not working for me!!!

Status
Not open for further replies.

minht

Programmer
Nov 9, 2000
1
IN
Hi there. could somebody help explain why the last_insert_id() command will not work when i use it pls.
I have two tables, one main and the other secondary. The seconday has an main_id column which referecnce the id from the main table. To do this i first insert an entry into the main table. Immediately after the entry i used the following at the command prompt:
select last_insert_id();
but the error i get is
parse error near '()' at line 1
im using mysql distribution 3.20.32a
any help would be most appreciated.
minht@emagen.com.au
 
Hi! I have been using the 3.22.34 stable version and last 3.33.27 version. I never had problem using the select last_insert_id() command. I even use it at Delphi + MySQL application.

Maybe you should upgrad it to a newer version from
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top