CodeIgniter Forums
How to Print Single Name - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: How to Print Single Name (/showthread.php?tid=79258)



How to Print Single Name - Zouton - 05-19-2021

Help me out to fetch only single store Data to below mentioned SQL queries

Code:
select
affiliateURL as url,
`store`.`name`
from
`store`
inner join
`store_coupon_junction` as `scj` on `store`.`id` = `scj`.`storeId` and `scj`.`storeCouponRank` >= 0
inner join
`category_coupon_junction` as `ccj` on `scj`.`couponId` = `ccj`.`couponId` and `ccj`.`categoryCouponRank` >= 0
inner join
`category` on `ccj`.`categoryId` = `category`.`id` and `category`.`active` = 1
inner join
`coupon` on `scj`.`couponId` = `coupon`.`id` and `coupon`.`active` = 1 and `coupon`.`type` != ''
where
`store`.`active` = 1
order by
`store`.`rank` desc



RE: How to Print Single Name - craig - 05-19-2021

Please use the [code] tag to format your message so it's readable.


RE: How to Print Single Name - includebeer - 05-19-2021

You will probably need to add a "group by". Something like "group by affiliateURL, store.name".


RE: How to Print Single Name - PromoCoupons - 07-29-2021

did you get any solution ?


RE: How to Print Single Name - ojmichael - 07-29-2021

limit 1