Are  you referencing the result set correctly in php ?

How are you dealing with what MySQL returns ?

 Looks like the info is there, you just not getting it out of the result
set.


 ---------------------
 Jerry @
 MetalCat.Net
 ---------------------

----- Original Message -----
From: "Guru Geek" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, February 15, 2003 10:09 AM
Subject: Need Help With MySQL Query


> hello,
>
> I've performed searches on this site and php.net to try and figure out
> why this is occuring.  I can't find any instance in my searches that
> helped me.  So, I'm posting my very first question to this list....
>
> Here's my table ($usertableDaily):
>
> vanNumber|grossPay
> ---------------------
> 1111          | 1000
> 1111          | 500
> 2222          |100
> 2222          |100
>
> Here's my query:
> SELECT SUM(grossPay) FROM $usertableDaily WHERE vanNumber =
> $vanList[$count]
>
> The query appears inside a loop hence the $vanList[$count] variable.  I
> have a txt file that contains the van numbers.  I read that file and
> then run through the loop and for each van number I execute the above
> statement.  Yes, I've trimmed off any extra blank spaces before and
> after the 'read' van numbers...
>
> I want to SUM the grossPay for each van number.  Here's what it should
> be:
> 1111 $1500
> 2222 $200
>
> But when I execute I get this:
> 1111 Resource id#3
> 2222 Resource id#4
>
> Anyone got any idea why this is happening?
>
> Thanks in advance,
> Roger
>
>
>
> ---------------------------------------------------------------------
> 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
>


---------------------------------------------------------------------
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