arrg need help summing Colum's

2006-04-13 Thread Brian E Boothe
why cant i get this to sum ??? ? $link = mysql_connect(localhost,root,goobers) or die(mysql_error()); mysql_select_db(workorder, $link); $result = mysql_query(SELECT SUM(`ElecRem`) AS total FROM orders, $link);

Re: arrg need help summing Colum's

2006-04-13 Thread Rhino
- Original Message - From: Brian E Boothe [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Friday, April 14, 2006 5:09 AM Subject: arrg need help summing Colum's why cant i get this to sum ??? ? $link = mysql_connect(localhost,root,goobers) or die(mysql_error

Re: arrg need help summing Colum's

2006-04-13 Thread Puiu Hrenciuc
I don't think your code should work anyway, you should really check PHP manual to get this work. mysql_query doesn't actually return the result, but a resource id that can be used with mysql_fetch_xxx functions. Try this : $link = mysql_connect(localhost,root,goobers) or die(mysql_error());