On Wed, 18 Dec 2002 22:54:53 -0500, C. Reeve wrote:
>while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
> $num1 = $line['number'];
>}
Loop through the result and return the value from the last row?
Did you want "select sum(number) as SubTotal1 from table1 where
userid=$user1"?
>$query "select number from table2 where userid=$user2";
>$result = mysql_query($query) or die("Query failed");
You re-used the same variable $result. Offhand I would try
using a second variable, and/or using mysql_free_result() in between.
- Steve Yates
- My hard disk is full! Maybe I'll try this message section thing.
~ Taglines by Taglinator - www.srtware.com ~
---------------------------------------------------------------------
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