0
我有两个表。 Table_1有这个字段。MySQL查询不返回任何内容或返回错误的数据
table_1_id
name
image
adres
TABLE_2
table_2_id
name
email
phone
comment
datetime
need_id
我要让我的ID_1
形式table_1
点击加载我从table_2
具有table_1_id = 1
我与此查询
SELECT t1*, t2.* FROM table_1 t1, table_2 t2
WHERE t1.table_1_id = t2.need_id ORDER BY `DateTime` DESC
尝试了所有行
并显示空白页。然后我试图这样
SELECT t1.*, t2.* FROM table_1 t1
JOIN table_2 t2 ON t1.table_1_id = t2.need_id ORDER BY ` DateTime` DESC
这一切我点击返回从数据库中第一条结果就是这样。
它的工作完美。谢谢! – 2014-12-02 15:18:24