Your SQL statement is selecting from two tables, it doesn't know which table the 'active' column belongs to. Try one of the following as appropriate to your schema:

tasks.active="yes"
or
users.active="yes"

HTH,
Jason k Larson


Bruce Levick wrote:

I have this silly problem. This select query works fine.

####################################################
$query_retrievetasks = "SELECT * FROM tasks, users WHERE tasks.UID =
users.User_id ORDER by tasks.ID";
####################################################

But when I add a further filter (AND active="yes") ....it comes up
blank...currently all the active rows in the tasks table are equal to
"yes" so they should still display, but comes up with a blank.

####################################################
$query_retrievetasks = "SELECT * FROM tasks, users WHERE tasks.UID =
users.User_id AND active="yes" ORDER by tasks.ID";
####################################################

Can't understand this, is it just something simple I am missing??

Cheers



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

Reply via email to