Re: Adding up the RESULT

From: Date: Wed, 17 Apr 2002 17:20:37 +0000
Subject: Re: Adding up the RESULT
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-18609@lists.php.net to get a copy of this message
On Thursday 18 April 2002 00:08, Joel Colombo wrote: > i was wondering about a PHP function like mysql_fetch_array > but that would select all the ROW values of one FIELD > rather the "mysql_fetch_array" selecting all FIELDS of ONE row. > > does PHP have that function ? Not yet. > basically y do i need that ? You don't :) > because i am selecting a number of rows from my table from 1 to 35000 at a > time > i need the SUM of one field based on the ROWS selected.... > but... no GROUP BY because the table has 2 fields: index, and fieldname Why not do it in the database? SELECT SUM(price) FROM products; > i have also posted this question in mailing.database.mysql but the traffic > in that group has been too light... > and posted to alt.php.sql but i will take any suggestions from any group on > this one... How about the MySQL mailing list? -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* "MSDOS didn't get as bad as it is overnight -- it took over ten years of careful development." (By dmeggins@aix1.uottawa.ca) */

« previous php.db (#18609) next »