Veysel Harun Sahin wrote:

select vanNumber, sum(grossPay) from usertableDaily group by vanNumber;

The above is the correct query, to save yourself some time. As for your problem:

But when I execute I get this:
1111 Resource id#3
2222 Resource id#4

This means you're using a resource response from a query, not the data in the query. Don't forget to do a mysql_fetch_array or mysql_fetch_row on the resource before using it.

As a test:

$res = mysql_query(...);
print $res;
while ($row = mysql_fetch_array($res)) {
print $row;
print $row['id'];
}

--
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock



---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Reply via email to