Full Version: MySQL Error
UtterAccess Discussion Forums > And More... > PHP, Perl, MySQL and Postgres
DrummD
Im getting the below error message

Error Executing Database Query.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select last_insert_id() as scope_identity' at line 13

Heres where i have scope_identity:

SELECT last_insert_id() AS scope_identity;
</cfquery>
<cfset Variables.invArray[Variables.invoiceCounter].invKey = qinsertinvoice.scope_identity>

Can anyone help me out here in fixing this error
Thanks
Damien
cheekybuddha
Hi Damien,

Not sure why this not working. Normally these errors are in syntax just before the "... to use near ' " part.

What is the previous line of code to the SELECT statement? Is it delimited properly? What language is this by the way?


d
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.