Example #1
0
function process_sites($mysqli)
{
    //process sites
    $sql = " select post_id from sc_site_tracker where site_flag = 0 order by id desc limit 50";
    $rows = MySQL\Helper::fetchRows($mysqli, $sql);
    //halt for error.
    $siteDao = new \com\indigloo\sc\dao\Site();
    foreach ($rows as $row) {
        $postId = $row["post_id"];
        $siteDao->process($postId);
        sleep(1);
    }
}