|
Posted by Tony on 07/13/05 03:03
bettina@coaster.ch wrote:
> here is my code:
> line 39 $total_1 = mysql_query("SELECT COUNT(*) FROM COASTERS");
> line 40 $total_coasters = mysql_result($total_1,0,0);
> line 41 $total_2 = mysql_query("SELECT COUNT(*) FROM COUNTRIES");
> line 42 $total_countries = mysql_result($total_2,0,0);
> line 43 $GET_DATE = mysql_query("SELECT DATE_FORMAT(DATE,'%d.%m.%Y')
> FROM COASTERS ORDER BY DATE DESC LIMIT 1");
> line 44 $update = mysql_result($GET_DATE,0,0);
>
> I get errors on line 40, 42 and 44 and I'm only counting the records
> and getting the latest date,,, And what's strange is that it works
> local!!!!
As others have pointed out, you should be having some error checking:
if (!$total_1) { print mysql_error(); }
after line 39 (and one for $total_2 after line 41)- that would tell you why
you're not getting a proper result back. Otherwise, it doesn't seem to be a
code problem. Add the error checking & come back with the exact error
message you get.
--
Tony Garcia
Web Right! Development
Riverside, CA
www.WebRightDevelopment.com
Navigation:
[Reply to this message]
|