I've written a fairly complex content management system and I am currently working on building in a staging/preview section.
Currently I have a database row called 'Approved', if an entry equals 'Yes' then the entry will show up on the live site, if 'No' then the live site skips over it and you can only view that entry in the backend staging/preview area.
Pretty simple.
I've already built in the ability to change the approval flag on individual entries but I would like to create a publish all link. I want that link to query the MySQL database for all entries where $Approved = No and update them to be $Approved = Yes.
Ideas on a swift way to accomplish this? Would I run a Query and Update statements in the same loop? Can I Query all the results into an array and then do an Update loop using they query array?
Any direction is appreciated.