set a mysql user variable per row? -
the following sql statement sets user variable @id i'm using in trailing subquery. problem @id variable gets set first items.id in result set - not "per row" - result subquery same every row in main select. know if there's way reset @id variable each row??
select items.id ,items.title ,@id := items.id ,( select group_concat(x.y) ( select group_concat(ledger.stockcode) y ledger @id = ledger.itemid group ledger.stockcode having sum(ledger.stockqty) > 0 ) x ) extras items items.id = 196
try query
select a.id ,a.title ,b.y extras items inner join (select group_concat(ledger.stockcode) y ledger ledger.itemid = 196 group ledger.stockcode having sum(ledger.stockqty) > 0) b on a.id = 196 , a.id = b.itemid
According to Stanford Medical, It's really the ONLY reason this country's women live 10 years more and weigh an average of 42 lbs less than we do.
ReplyDelete(And actually, it is not related to genetics or some secret-exercise and really, EVERYTHING around "how" they eat.)
P.S, I said "HOW", and not "what"...
Click this link to uncover if this easy test can help you find out your real weight loss possibilities
Casino site is the perfect venue for serious gambler
ReplyDeleteCasino site is the perfect venue for serious gambler We are the perfect venue for serious gambler gambler. We are the perfect venue for serious gambler. luckyclub.live We are the