Skip to content

Instantly share code, notes, and snippets.

@sinkovsky
Created October 16, 2009 11:43
Show Gist options
  • Save sinkovsky/211760 to your computer and use it in GitHub Desktop.
Save sinkovsky/211760 to your computer and use it in GitHub Desktop.
if ($_REQUEST['blog_id'] == 2 || $_REQUEST['blog_id'] == 18)
{
//checking for existing corresponding row in mt_entry_extra
if (!self::IsEntryExtraExist($_REQUEST['entry_id']))
{
self::InsertEntryExtra($_REQUEST['entry_id']);
}
// insert extra data
$affectedRows = self::$Dbh->extended->autoExecute("mt_entry_extra", $extra_values, MDB2_AUTOQUERY_UPDATE, "entry_extra_id=".self::$Dbh->quote($_REQUEST['entry_id']));
}
else
{
//checking for existing corresponding row in mt_entry_extra
if (!self::IsEntryExtraExist($_REQUEST['entry_id']))
{
self::InsertEntryExtra($_REQUEST['entry_id']);
}
$extra_blog_values = array();
$extra_blog_values['entry_extra_show_tweets'] = $extra_values['entry_extra_show_tweets'];
// insert extra data
$affectedRows = self::$Dbh->extended->autoExecute("mt_entry_extra", $extra_blog_values, MDB2_AUTOQUERY_UPDATE, "entry_extra_id=".self::$Dbh->quote($_REQUEST['entry_id']));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment