December 13, 20169 yr Hello, I am trying to create a project which I have two tables- one table stores projects and the other table stores the project id's and the user ids of the users assigned to them. Multiple users can be assigned to a project. For example user id 1 might be assigned to project id 5 user id 2 might be assigned to project id 5 I want to then grab all the projects assigned to that particular user and echo out the data stored in the projects table. I am using PDO just having issues doing this - I can grab all the data individually so for example I can grab all the projects assigned to a particular user on the project id's and user id's table just not both together. Can anyone help?..
December 13, 20169 yr SELECT * FROM users INNER JOIN projects ON (users.id = project.user) somnething like that (you will have to modify it for your tables)
Create an account or sign in to comment