mySQL数据库报错You have an error in your SQL syntax-问答-阿里云开发者社区-阿里云

开发者社区> 问答> 正文

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

落地花开啦 2016-02-14 16:09:24 104969

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()

SQL 关系型数据库 MySQL PHP 数据库
分享到
取消 提交回答
全部回答(1)
  • 落地花开啦
    2019-07-17 18:42:42

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

    1 0
数据库
使用钉钉扫一扫加入圈子
+ 订阅

分享数据库前沿,解构实战干货,推动数据库技术变革

推荐文章
相似问题
推荐课程