echo the actual sql statement from runtime and post it.

"Natividad Castro" <[EMAIL PROTECTED]> wrote in message
> Hi to all,
> I'm working in a system where users can post projects. Other users will
> verify those projects. What I'm trying to do is once a user verify a
> he/she cannot view it anymore, but I want to keep it available for the
> users that haven't verified it.
> I have two tables project and user_verified. On project table I keep all
> projects that users post.
> On user_verified I keep users who already verified for a project.
> These are the fields for user_vefified table
> project_id, username, verified
> Everytime a user verifies a project I insert a new record to the
> user_verified table.
> This the query, but it doesn't work.
> It selects the same record from the two tables. e.g. if the records exist
> twice on the user_verified table and one on the project table, it will
> display three records when I run the the following query:
> $sql = "SELECT project.project_id, project.project_name,
> project.project_desc FROM project, user_verified
>        WHERE project.username <> user_verified.username AND
> <> '$PHP_AUTH_USER' AND project.category='$category')";
> any help is greatly apprecciate it
> Thanks in advance
> Nato

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to