View Single Post
  #7 (permalink)  
Old 20-01-2004, 10:17 AM
kidino kidino is offline
Senior Webmaster
 
Join Date: Oct 2001
Location: Kuala Lumpur, Malaysia
Posts: 294
Rep Power: 93
kidino is on a distinguished road
Send a message via Yahoo to kidino
Use this SQL
Code:
$sql = "select sum(vol) where user like 'abu'";
Why ... ?? Whenever possible, put the data calculation at the db server. Great advantage especially when webserver & db server are two different machine. Second, when dealing with text or string, use LIKE rather than "=".
__________________
--------------------------------------------
Khairil Iszuddin Ismail

Last edited by kidino; 20-01-2004 at 10:39 AM.
Reply With Quote