Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
输入图像URL(http://...)在mysql表中_Mysql_Database_Url - Fatal编程技术网

输入图像URL(http://...)在mysql表中

输入图像URL(http://...)在mysql表中,mysql,database,url,Mysql,Database,Url,我试着在mysql中使用这个: INSERT INTO users (url) VALUES (http://31.media.tumblr.com/tumblr_ljtc6i9GPA1qbq4v6o1_400.gif) WHERE id='15'; 但它给出了这样一个错误: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version f

我试着在mysql中使用这个:

      INSERT INTO users (url) VALUES (http://31.media.tumblr.com/tumblr_ljtc6i9GPA1qbq4v6o1_400.gif) WHERE id='15'; 
但它给出了这样一个错误:

"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 '://31.media.tumblr.com/tumblr_ljtc6i9GPA1qbq4v6o1_400.gif) WHERE id='15'' at line 1"

有人能告诉我原因是什么以及如何在表中存储url吗?

INSERT INTO语句没有WHERE子句。如果要使用WHERE子句,只需更新一行即可。 更新表名称 设置column1=value1,column2=value2,。。。
其中,某个_列=某个_值

INSERT
使用
WHERE
条件进行查询。。什么原因??使用引号:
'http://...“
在字符值周围加单引号,并在小数点处将其删除。但是你想做什么呢?您混合了插入和更新语法!我很抱歉。这是我的错。我把更新和插入放在一起,把它们混在一起了。很抱歉