Skip to content

Instantly share code, notes, and snippets.

@tiomoreno
Created February 25, 2013 15:37
Show Gist options
  • Save tiomoreno/5030663 to your computer and use it in GitHub Desktop.
Save tiomoreno/5030663 to your computer and use it in GitHub Desktop.
<?php
ini_set('memory_limit', '512M');
ini_set('date.timezone', "America/Sao_paulo");
require_once 'PdoFactory.php';
require_once 'Metadata.php';
$config = include_once 'config/cron_config.php';
function logsNulos($database)
{
$sql = "SELECT
*
FROM
log
WHERE
id_course is null
";
return $database->query($sql)->fetchAll(PDO::FETCH_ASSOC);
}
try {
$database = PdoFactory::getInstance($config);
$logsNulos = logsNulos($database);
var_dump(count($logsNulos));
} catch (PDOException $pdoex) {
echo $pdoex->getMessage();
} catch (Exception $ex) {
echo $ex->getMessage();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment