Created
October 15, 2012 14:14
-
-
Save paulomcnally/3892664 to your computer and use it in GitHub Desktop.
mt_twitter_accounts_add
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @Method mt_twitter_accounts_add | |
* @Desc Add new twitter account | |
*/ | |
public function mt_twitter_accounts_add( ) | |
{ | |
$query = "REPLACE INTO tblTwitterAccounts | |
( | |
id, | |
screen_name, | |
oauth_token, | |
oauth_token_secret, | |
app_id | |
) VALUES | |
( | |
'".$this->post_data['id']."', | |
'".$this->post_data['screen_name']."', | |
'".$this->post_data['oauth_token']."', | |
'".$this->post_data['oauth_token_secret']."', | |
'".$this->post_data['app_id']."' | |
)"; | |
$this->mysql->query( $query ); | |
if( $this->mysql->rows_affected > 0 ) | |
{ | |
$this->fn_set_json_type(true); | |
$this->fn_set_json_message( "Ok" ); | |
} | |
else | |
{ | |
$this->fn_set_json_type(false); | |
$this->fn_set_json_message("Hubo un error al intentar guardar la cuenta de twitter."); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment