THE SHORT: I am looking for the sql query I need to run in order to change the status of an entry. Any help would be appreciated.

THE LONG: I have two sperate channels and they are NOT linked via a relationship field, however if the status of an entry in Channel A is closed and a field in Channel A matches a field in Channel B I need to update the status of the entry in Channel B. I plan on running this via a cron to automatically update these entries and I dont want to require my users manually change the entries.


  • If there isn't a relationship field, how do you know which entry in Channel B to compare to the entry in Channel A? Jan 17, 2013 at 4:31
  • The field is generated from an existing field from a different channel using stash. It's wonky - but works for what i needed without creating a relationship field. Jan 17, 2013 at 18:52
  • A trigger is more elegant in this case than a cron job. Feb 13, 2015 at 22:09

1 Answer 1


Your question asks for a query to change the status of an entry. This is the code you'd use to change the status for a specific entry_id:

 UPDATE exp_channel_titles t 
 SET t.status = 'pending' 
 WHERE t.status = 'open'
 AND t.entry_id = "1"

I suspect you need something more complicated though. If that's the case, you'll need to update your questions with more specific detail.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.