我有这个工作正常的查询:
SELECT p.design_id, p.product_id, t.account_id, p.name, p.width, p.height,
p.price, t.email
FROM designs AS p
INNER JOIN ( SELECT user_id, email, account_id FROM users ) AS t
USING(user_id) ORDER BY p.design_id LIMIT 0, 300 );
现在我正在尝试修剪结果:
SELECT p.design_id, p.product_id, t.account_id, p.name, p.width,
p.height, p.price, t.email
FROM designs AS p
INNER JOIN ( SELECT user_id, email, account_id FROM users
WHERE account_id = 0) AS t
USING(user_id) ORDER BY p.design_id LIMIT 0, 3 );
但是第二个查询结果和第一个完全一样。
请问有人可以对此有所了解吗?
//更新
我删除了 php 变量以阻止不必要的混淆 :)