Re: num_rows not working when used SUM()
Thank you for the reply Peter.
I am sorry, do i SUM(prices.priceid) in the query itself or after i get the results and then i Sum?
$query = "SELECT items.itemid, prices.priceid FROM items
JOIN prices ON items.itemid = prices.itemid AND SUM(prices.priceid) as PR
WHERE items.clientid = '$clientid'";
Please help. I believe SUM for the results is not recommended. You should SUM in the query itself. Is it true? Especially for a DB with lots of rows.
Subject
Written By
Posted
February 28, 2015 12:32AM
February 28, 2015 02:00AM
Re: num_rows not working when used SUM()
February 28, 2015 02:32AM
February 28, 2015 11:49AM
February 28, 2015 03:56AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.