Created
May 9, 2014 18:10
-
-
Save tjtate/c2f5ef0ff181d42f8ddb to your computer and use it in GitHub Desktop.
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
<?php | |
global $wpdb; | |
//get all articles | |
$articlecount = $wpdb->get_results( 'SELECT COUNT(ID) AS total_posts FROM wp_posts WHERE post_status = "publish"' ); | |
$articlecount = $articlecount[0]->total_posts; | |
$sql_limit = 200; | |
//$increment_limit = 1; | |
$increment_limit = ceil($articlecount / $sql_limit); | |
for ($i=1; $i <= $increment_limit; $i++) { | |
$starting_point = $i * $sql_limit; | |
$articles = $this->get_articles($starting_point); | |
$response = $this->send_to_profiles( $articles, 'articles/articledata' ); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment