小弟在用php向mysql数据库 插入数据的时候
比如一次插入5个字段,其中A字段是int类型
这时只要A字段为空——情况一(A,。。。)(,。。。)
情况二(A,。。。)(‘’,。。。)有个兄弟说这种情况在他那里可以
情况三(A,。。。)($a,。。。)$a = '';
——就报错,sql语句就会执行错误,A字段为不为空,设置或者不设置默认值都不行
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 ' 'mlml', 'mlml', 419, 99 )' at line 2
update数据时,每次只能更新一个字段,多了后面的字段就全都报错了
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 'class_id= '3' imgsrc= 'mlml' WHERE id=3' at line 1
大神们这两个问题怎么解决?是php或者mysql配置的问题吗?
比如一次插入5个字段,其中A字段是int类型
这时只要A字段为空——情况一(A,。。。)(,。。。)
情况二(A,。。。)(‘’,。。。)有个兄弟说这种情况在他那里可以
情况三(A,。。。)($a,。。。)$a = '';
——就报错,sql语句就会执行错误,A字段为不为空,设置或者不设置默认值都不行
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 ' 'mlml', 'mlml', 419, 99 )' at line 2
update数据时,每次只能更新一个字段,多了后面的字段就全都报错了
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 'class_id= '3' imgsrc= 'mlml' WHERE id=3' at line 1
大神们这两个问题怎么解决?是php或者mysql配置的问题吗?
