In MySQL, I have two tables.
tasks
id
name
checklist
id
member_id
tasks_id
In the php page, I create the sql select string, I have a php variable that has a members_id
value which is the member id of the person logged in. How can I get all the records of the tasks
table, and add a new column to it called completed
, and the value is true
if there exists a record in the checklist
table that has the member_id
the same as the members id php variable and it's tasks_id
value is the same as the id
of the tasks
table, and false
if it doesn't exist?
Thanks