我有一个问题,每次我尝试选择和获取这个错误显示
您的SQL语法出现了错误;请检查与MySQL服务器版本对应的手册,以便在第1行中使用接近“add”的正确语法。
<?php
mysql_connect("localhost", "root", "123") or die() ;
mysql_select_db("boom") or die() ;
//Retrieves data from MySQL
$select= "select * from add" ;
$data =
任何人都知道下面的代码有什么问题,以及为什么我得到以下错误: Error in query:您的SQL语法有一个错误;请查看与您的MySQL服务器版本对应的手册,了解正确的语法,以便在第1行使用接近“更新”的值(‘’)。
php代码是
<?php
mysql_connect("localhost" , "" , "") or die (mysql_error());
mysql_select_db("") or die(mysql_error());
我的查询代码是:
$query = mysql_query("UPDATE books SET read = 'y' WHERE id = 2") or die(mysql_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 'read = 'y' WHERE id = 2' at lin
我一直收到这个错误,我非常肯定我的语法是正确的!
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 '='00001010'' at line 1
PHP代码:
<?php
$decode = str_split($_POST['ascii'], 8);
mysql_connect("localhost",
我试图在php中使用mysql_query进行更新,它给了我这个错误:
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 'read='1' WHERE id='14'' at line 1
我已经看了我的查询大约10分钟了,我找不到它有什么问题。这就是它:
if ($row['read'] == 0) {
这张桌子看起来像这样
mysql> DESCRIBE tenants;
+------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------+----------------+
| id | int unsigned | NO | PRI | NULL
我有一张叫condition的桌子。我需要保留该名称,但是当我执行以下命令时
Query qb = em.createQuery("SELECT c FROM Condition c ")
我得到了这个例外:
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right sy
我有两个服务器的一些最耗散的设置。在第一个(192.168.250.199)上我有django,在另一个(192.168.250.200)上我有一个mysql服务器
192.168.250.200:/etc/my.cnf
[mysqld]
#Base settings for mysql
datadir=/ext/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
#Coding settings for databases
default-character-set=utf8
character-set-server=utf8
col
我只想对我的sql数据库中的表执行一次简单的插入操作。尽管如此,我还是得到了这个错误,尽管我尝试了几种方法。我在数据库"test“中得到了一个名为" values”的表,其中id为"idValues“,int值为"value”。我只想插入一条简单的记录,ID为1,值为1 (1/1)。是不是某些版本有问题?
package jdbcdemo;
import java.sql.*;
public class Driver {
public static void main(String[] args) {
// TODO Auto-generated me
注意:我知道MySQL并不理想,但它已经完成了。
注意:我知道逗号是拼写错误的。
QUERY 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 'desc, cost, price, count, commited, ordered, cat, subcat, notes, rev_identifier,' at line 1
Query was I
我在我的电脑上测试一个软件,我在上面安装了mysql。现在我已经把这个软件转移到服务器上了。没有任何mysql命令正在运行 例如,这是在我的计算机上工作的命令 SELECT COUNT(*) FROM camera WHERE stored=3; 当我尝试在我的服务器上执行它时,结果如下 1064 - 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 'stored=3
我从mySQL收到以下错误消息:
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 'key,time)
VALUES ('FreeTest','86400')' at line 2
代码如下:
if ((isset($_POST['key'])) && (isset($_POST['da
当我试图发出命令时,有一个名为“插入”的客户。
mysql> create database insert;
我得到以下错误
ERROR 1064 (42000): 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 'insert' at line 1
是否有一些关键字不能用作数据库名称?
谢谢