【发布时间】:2017-02-27 07:22:51
【问题描述】:
查询 1:
select products
from buyde_deal
where displayflag = '1'
and end_date> now()
and start_date < now() limit 1
输出:
查询 2:
SELECT id,productname ,cat_id ,subcat_id,shortdescription1,shortdescription2,shortdescription3 ,sellingprice,sellpricevat,mrp,regularprice,costprice,sku,qty,pweight,seller_id,shippingcost,color,size,discount
FROM `buyde_product`
WHERE id IN (
select products
from buyde_deal
where displayflag = '1'
and end_date> now()
and start_date < now() )
ORDER BY `buyde_product`.`id` "
输出:
如果我运行第二个查询,则只返回一条记录。我需要表 1 中的所有记录。
【问题讨论】: