本帖最后由 wnddd 于 2010-4-20 17:06 编辑  
 
我想调用supe_attachments里面的数据和supe_spacenews的数据,条件是supe_attachments里面的aid等于特定值比如80,然后再从supe_spacenews调用相同itemid的数据,这样写行么?- SELECT a.*, n.* FROM supe_attachments a, supe_spacenews n, WHERE a.aid = 80 AND n.itemid = a.itemid
 
  复制代码 我就是这样写的,不行。。。。。。 
提示: 
- SQL: SELECT a.*, n.* FROM [Table]attachments a, [Table]spacenews n, WHERE a.aid = 80 AND n.itemid = a.itemid LIMIT 0,1
 
 - 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 'WHERE a.aid = 80 AND n.itemid = a.itemid LIMIT 0,1' at line 1
 
 - Errno.: 1064
 
  复制代码 |