コード例 #1
0
ファイル: donations.php プロジェクト: radicaldesigns/jaguar
<?php

list($cmd, $update_count_date) = $argv;
$new = $db->query("SELECT DISTINCT donate_page_KEY FROM donation WHERE Date_Created >= " . $update_count_date);
if ($new->num_rows > 0) {
    while ($new_arr = $new->fetch_assoc()) {
        $donate_page_info = $db->query("SELECT * FROM email_blast_statistics WHERE email_blast_KEY=" . $new_arr['action_KEY'])->fetch_assoc();
        $donate_page = new DonatePage($donate_page_info);
        $donate_page->UpdateDonatePageCounts();
        $donate_page->db_update();
        $donate_page->data['key'] = $email->data['donate_page_KEY'];
        //$dia->save('donate_page', $donate_page->data);
    }
}
$new = $db->query("SELECT * FROM donation WHERE Date_Created >= " . $update_count_date);
if ($new->num_rows > 0) {
    while ($new_arr = $new->fetch_assoc()) {
        $donation_info = $db->query("SELECT * FROM donation WHERE donation_KEY=" . $new_arr['action_KEY'])->fetch_assoc();
        $donaton = new Donation($donation_info);
        $donaton->UpdateDonationCounts();
        $donaton->db_update();
        $donaton->data['key'] = $email->data['donation_KEY'];
        //$dia->save('donation', $donaton->data);
    }
}