On Sat, 2002-11-09 at 23:53, Chip Shabazian wrote:
> ok, here is my code without all of the html (sorry people).  I'm trying
> to get a sum of the field runtime.  With this code, I get "Resource id
> #3" as an error.  Any help getting me to the proper result would be
> greatly appreciated.
> 
> <?
> @$db = mysql_pconnect("localhost","dviewd");
> mysql_select_db("dvds");
> $query = "select * from list order by title";
> $result = mysql_query($query);
> $num_results = mysql_num_rows($result);
> $dvd_time_query = "select sum(runtime) from list";
> $dvd_time_result = mysql_query($dvd_time_query);
add this line;
$dvd_result=mysql_result($dvd_time_result,0,0);
> 
> echo "<td class=m><font size = -1><b>".$dvd_result."</b></td>";
//change $dvd_time_result to $dvd_result
> ?>



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