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


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to