mysql result not displaying based on my query
I have a table called add_project. Here you can view the table structure
of add_project
And the another table called assign_project Here you can view the table
structure of assign_project
Now the table add_project : Here on this table admin add the new projects.
The admin user_id is 1 so it is all common. project_status_id is the
completation of that project(0=new,1=working,3=completed).
Now the table assign_project : Here on this table the admin assigns the
project to different users.
Now what i want id to find is how many completed projects each user has
done. As you can see on the assign_table project_id(1,4)is completed by
the user_id=5.
So my query is how do i get that value.
Below is the query i have written
Select * FROM asign_project, add_project
WHERE asign_project.project_id = add_project.project_id
AND project_status_id='3'
AND user_id='5'
But it is showing
#1052 - Column 'user_id' in where clause is ambiguous
Waiting for your reply.
No comments:
Post a Comment