PHP Classes

tdCron W/ mysql

Recommend this page to a friend!

      tdCron  >  All threads  >  tdCron W/ mysql  >  (Un) Subscribe thread alerts  
Subject:tdCron W/ mysql
Summary:Trying to use tdCron with mysql and it is not displaying all job
Messages:1
Author:Leonardo Cruz
Date:2011-08-09 03:46:44
 

  1. tdCron W/ mysql   Reply   Report abuse  
Picture of Leonardo Cruz Leonardo Cruz - 2011-08-09 03:46:44
I am trying to use your class in conjunction with my database. I have over40 cron jobs. They are all in a database. Here is a sample of what I have done so far.

<?php
require_once('../includes/head.php');
require_once('class.tdcron.php');
require_once('class.tdcron.entry.php');
require_once('../includes/mysql.php');

$result = mysql_query("SELECT * FROM cron") or die (mysql_error());
mysql_close();

while($row = mysql_fetch_array($result)){

echo $row['job'] . '<br />';
echo ' Last Ran: ' . date('m/d/Y H:i T', $row['ran_at']) . '<br />';
echo ' Next Run: ' . date('m/d/Y H:i T', tdCron::getNextOccurrence($row['mhdmd'],$row['ran_at'])) . '<br /><br />';

require_once('../includes/footer.php');
}

However when I open it from my browser I only get the first two to three entries. I am not sure what is going on if I take out the Next Run line I get all the results from my mysql_query. Can you please shed some light.

Thanks