trying to update sql cell but getting syntax error
trying to update sql cell but getting syntax error
I'm writing code to update 2 cells of an sql table and I'm getting a syntax error with the following line of code: <code> UPDATE afdt3235 SET 102='NdNicSg98NkM9cEZB7/SNQ==', 103='N' WHERE 104='42' </code> I'm currently using mysql
Server type: MariaDB
Server version: 10.1.22-MariaDB - mariadb.org binary distribution
Protocol version: 10
Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/7.1.4
Database client version: libmysql - mysqlnd 5.0.12-dev - 20150407 - $Id: b396954eeb2d1d9ed7902b8bae237b287f21ad9e $
PHP version: 7.1.4
here is the entire error that I am getting:
Error updating record: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '102='NdNicSg98NkM9cEZB7/SNQ==', 103='N' WHERE 104='42'' at line 1
Replies
This is a forum for DataTables not MySQL. However I think your problem is with using column names with all digits. According to the MySQL docs:
Kevin