I have the table categories:
categories_id | categories_status | parent_id
1 1 0
2 1 0
3 0 1
4 0 2
5 1 1
6 0 2
How can i select and update the status of the categories where all child categories having status = 0 (in this example it’s just the categories_id 2)? I need to integrate this in PHP.
Thanks in advance,
Alex
Likely you don’t have to use PHP, a SQL will do.