开发者社区> 问答> 正文

mySQL数据库报错You have an error in your SQL syntax

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 'order by cid desc' at line 1
这是一个什么错误啊,请大侠指点
SQL Error:
MySQL Query Error
select * from dg_taobao_cat where cid= order by cid desc
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 'order by cid desc' at line 1
PHP Backtrace
File Line Function
includesdb_mysql.class.php 92 db_mysql->halt()
includestable.class.php 119 db_mysql->query()
taobao.php 79 TableClass->getdata()
taobaoview.php 144 taobao_position()
taobao.php 42 include_once()

展开
收起
落地花开啦 2016-02-14 16:09:24 137137 0
3 条回答
写回答
取消 提交回答
  • 语法错误

    2022-06-23 18:06:37
    赞同 展开评论 打赏
  • 错误提示很明显啊,语法错误

    have an error in your SQL syntax
    
    2021-10-12 15:28:21
    赞同 展开评论 打赏
  • 喜欢技术,喜欢努力的人

    select * from dg_taobao_cat where cid=xxxx order by cid desc
    把xxx先补全了
    但是cid=具体指后面排序就没什么意义了
    select * from dg_taobao_cat order by cid desc 这个也许是你要的

    2019-07-17 18:42:42
    赞同 1 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
SQL Server 2017 立即下载
GeoMesa on Spark SQL 立即下载
原生SQL on Hadoop引擎- Apache HAWQ 2.x最新技术解密malili 立即下载

相关镜像