mySQL问题 [英] mySQL Problem
问题描述
我的一个php脚本中的
是以下查询(已打开
db-connection):
$ q =" INSERT INTO main(name,img,descr,from,size,format,cat,
host,link,date)VALUES(''$ name'',''$ img'',''$ descr'',''$ user'',''$ size'',
''$ format'',''$ cat'',''$ host'',''$ link'',''$ date'')"或者死(mysql_error());
当查询执行时我得到以下错误:
你有错误你的SQL语法;检查
对应于您的MySQL服务器版本的手册,以获得正确的语法使用
''from from,size,format,cat,host,link,date)VALUES ('''''''''''','
''keine'',''Holgi'',''在第1行
这里有什么问题?!
欢呼
Hi,
in one of my php-scripts is the following query (with an already open
db-connection):
$q = "INSERT INTO main (name, img, descr, from, size, format, cat,
host, link, date) VALUES (''$name'', ''$img'', ''$descr'', ''$user'', ''$size'',
''$format'', ''$cat'', ''$host'', ''$link'', ''$date'')" or die(mysql_error());
And when the query gets executed i get back the following error:
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 ''from, size, format, cat, host, link, date) VALUES (''bla'', ''-'',
''keine'', ''Holgi'','' at line 1
Whats wrong here?!
cheers
推荐答案
q =" INSERT INTO main (名称,img,descr,from,size,format,cat,
host,link,date)VALUES(''
q = "INSERT INTO main (name, img, descr, from, size, format, cat,
host, link, date) VALUES (''
name'',''
name'', ''
img'',''
这篇关于mySQL问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!