+ -
当前位置:首页 → 问答吧 → sql语句请教

sql语句请教

时间:2010-09-19

来源:互联网

select `tz_content`.id as ctid,`tz_web`.id as wwid,
`tz_type`.type as tname,title,img,curl,team_price,market_price,end_time,rebate,city,webname,vip from `tz_content` inner join `tz_wz` on `tz_wz`.id=`tz_content`.wz_id inner join `tz_web` on `tz_web`.id=`tz_wz`.wid inner join `tz_city` on `tz_city`.cid=`tz_wz`.cid inner join `tz_type` on `tz_type`.tpid=`tz_wz`.tpid                                                     我要查询出这个结果的纪录条数,是不是在前边加上 select count(*) from   就可以了??   怎么老是报错??                                                             

 错误提示: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 'from `tz_content` inner join `tz_wz` on `tz_wz`.id=`tz_content`.wz_id inner join' at line 2;   到底是什么原因???

作者: 帅帅   发布时间: 2010-09-19

select * from `tz_content`
inner join `tz_wz` on `tz_wz`.id=`tz_content`.wz_id
inner join `tz_web` on `tz_web`.id=`tz_wz`.wid
inner join `tz_city` on `tz_city`.cid=`tz_wz`.cid
inner join `tz_type` on `tz_type`.tpid=`tz_wz`.tpid      
试试这个有错误吗?
如果没有错误的话 就修改你们 查询字段

作者: lbc227540   发布时间: 2010-09-19

这个没有错误,是有结果的!!  

作者: 帅帅   发布时间: 2010-09-19

修改查询字段??  什么意思?  请说的清楚一点好不?  谢谢!!!

作者: 帅帅   发布时间: 2010-09-19

相关阅读 更多

热门下载

更多