Created
November 13, 2012 17:55
-
-
Save agustinhaller/4067303 to your computer and use it in GitHub Desktop.
cursors
This file contains hidden or 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
| function saveCursor($cursor, $twitter_username) | |
| { | |
| $conn = connect_db(); | |
| if($conn!=false) | |
| { | |
| $q_uscht = "UPDATE users_followers | |
| SET next_cursor = ".$cursor." | |
| WHERE tw_account = '".$twitter_username."'"; | |
| $r_uscht = mysql_query($q_uscht); | |
| } | |
| // Destroy db connection | |
| disconnect_db($conn); | |
| } | |
| function getCursor($twitter_username) | |
| { | |
| $conn = connect_db(); | |
| $cursor = null; | |
| if($conn!=false) | |
| { | |
| $q_uscht = "SELECT next_cursor FROM users_followers | |
| WHERE tw_account = '".$twitter_username."'"; | |
| $r_uscht = mysql_query($q_uscht); | |
| $tmp = mysql_fetch_row($r_uscht); | |
| $cursor = $tmp[0]; | |
| } | |
| // Destroy db connection | |
| disconnect_db($conn); | |
| return $cursor; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment