ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Updating entry status outside of CP

December 15, 2010 3:43pm

Subscribe [2]
  • #1 / Dec 15, 2010 3:43pm

    Michael Espinosa

    64 posts

    I had originally posted this in the community forums thinking someone in the community would have done this before but didn’t get any response. Link - http://ellislab.com/forums/viewthread/175446/

    I wrote a little js/php for example.php to update the entry status (the page lists multiple entries) in the exp_weblog_titles table. The code updates the status in the table and is reflected properly when opened up in the cp too, but the example.php doesn’t reflect the changes. The entry continues to be listed under original status. What am I missing that it would cause it to not be listed under the new status.

    Here is the code I’m using to update the exp_weblog_titles table:

    $q = "UPDATE `exp_weblog_titles` SET `status` = '$s', `edit_date` = '$d' WHERE entry_id = '$id'"; 

    Thanks,
    
Michael

  • #2 / Dec 16, 2010 3:27am

    John Henry Donovan

    12339 posts

    Michael,

    What are you using to list the entries?
    Are you sure your $s matches the status already in place? Check for correct case, capital letters etc

    Can you see it changed in the database?

    This thread will more than likely be moved back to the CodeShare Corner but lets see what you have first

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases