I'm trying to select (via MySQL) all the items used in 2 specific exhibits (using their exhibit_id values) and set those items to public but can't quite figure it out.
I know the syntax is bad in the semi-psuedo-code below, but this is how I'm thinking about it. What is the better/correct way to approach this? (obviously, I don't do much with MySQL).
// set pages variable: select all pages in desired exhibits
SELECT @pages := id FROM omeka_exhibit_pages WHERE exhibit_id =111 OR exhibit_id =112;
// set items variable: select all items from exhibit pages matching the pages selected above
SELECT @items := item_id FROM omeka_exhibit_page_entries WHERE item_id =@pages;
// set the selected items to public
UPDATE omeka_items SET public=1 WHERE id=@items