mysql - mysql_query 的更新语法有问题

标签 mysql syntax

$sql = "UPDATE 'load' SET 'graphe'=".$graphe."','intersection'='".$intersection."','ville'='".$ville."' 其中id= '".$id."'";

我在搜索后使用了上面的内容,有人说它更正了语法。 当我运行它时,我失败了。

谢谢

皮特

最佳答案

将 ' 更改为 ` AND 在 ".$graphe 之前插入 '

$sql = "UPDATE `load` SET `graphe`='".$graphe."',`intersection`='".$intersection."',`ville`='".$ville ."' where id='".$id."'";

关于mysql - mysql_query 的更新语法有问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23305658/

相关文章:

c++ - 在循环条件中使用宏

php - 将名称写入mysql中一行的链接

c# - 将 dateTimePicker 插入 MySql phpmyadmin 数据库

mysql - Centos mysql远程访问

mysql - 将键值表连接到主表

在数据库 ListView 中使用 href 的 PHP 语法错误

mysql - 在 Mysql 中创建带有 BLOB 变量的存储过程

c++ - 与 C++ Exception throw 语句混淆

c - C 中的指针 : why is the * needed in *address_of_x = &x when getting the address of x?

c++ - Windbg 语法 - 将两个命令(MASM 和 C++)合二为一