• mysql_error() mysql_errno() 错误代码1064


    如果mysql_error()显示:ERROR 1064 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax***

    很可能是sql语句语法错误或者mysql中某个字段名显示错误 ;

    引用:

    ERROR 1064 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax***

     

    该错误一般出现在表名或者字段名设计过程中出现了mysql关键字导致的。例如假设我误用了code这个关键字做了字段名 MSSQL中关键字需要用‘[ ]’ 括起来。即[code]即可

    Mysql中呢,找了下资料,使用的时候用  `code` 如果不仔细看你一定以为是单引号,最初我也是这样认为的,但经实践发现用了单引号也是无法通过验证的,

    后来找了下详细说明才明白,不是单引号而是英文字母上面的那一行数字键,数字键的左边有一个键,上面是~ ,下面的是、这个键 。

     

  • 相关阅读:
    HDU
    Groundhog Build Home
    The Moving Points
    Problem I. Count
    Problem E. TeaTree
    树的启发式合并
    Special Segments of Permutation
    网络流24题
    2015-2016 Northwestern European Regional Contest (NWERC 2015)
    The 2018 ACM-ICPC Asia Beijing Regional Contest
  • 原文地址:https://www.cnblogs.com/feng12345/p/5373555.html
Copyright © 2020-2023  润新知