Error deleting record
Posted by: ik7ejc (---.50-151.wind.it)
Date: January 25, 2022 05:27PM

Hello everyone. I can't get rid of this error
"Error deleting record: 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 'int =' 17 '' at line 1"
shows in my php file line: $ sql = "DELETE FROM anagrafica WHERE int = '17'"
Could you please tell him? Thanks.

Options: ReplyQuote
Re: Error deleting record
Posted by: Otomatic (Moderator)
Date: January 26, 2022 09:39AM

Hi,

int is a MySQL reserved keyword.

MySQL 5.7 Keywords and Reserved Words

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Error deleting record
Posted by: ik7ejc (---.50-151.wind.it)
Date: January 26, 2022 09:43AM

Thank you very much. Resolved!

Options: ReplyQuote


Sorry, only registered users may post in this forum.