query 1:
select products
from buyde_deal
where displayflag = '1'
and end_date> now()
and start_date < now() limit 1
output :
query 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` "
output :
If i run the second query, only one record is returned. I need all the records from table 1 .