Re: mysql_num_rows

From: Date: Thu, 19 Sep 2002 18:55:52 +0000
Subject: Re: mysql_num_rows
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-21853@lists.php.net to get a copy of this message
> I'm getting a strange error message from calling this function > > It spits out <Unknown column 'Resource' in 'field List'> > This is my query: > > SELECT dept.name, count(maintenance.deptid)/$total AS percentage FROM > maintenance > JOIN dept WHERE maintenance.deptid=dept.deptid GROUP BY dept.name > > This query runs fine in console I just can't get mysql_num_rows to return a > value. > > This is running mysql 4.0.3 and php 4.2.3 What's the value of $total? Probably "Resource", meaning something else before you query isn't going as you expect it to. ---John Holmes...

« previous php.db (#21853) next »