...

View Full Version : Create a table in phpmyadmin



robojob
07-02-2007, 07:21 PM
i want to be able to create a table in my db using a php page where i can enter the start time and the end time and enter the interval and then click submit and it will generate the cols in the table for each... for example.

i enter

start time: 9.00
End time: 18.00
Interval: 10mins.

i want then the cols in the db to be 9.00, 9.10, 9.20...... etc etc...

any pointers on how to do this the best way?

Thanks.

devinemke
07-02-2007, 08:33 PM
$start = '9:00 am';
$end = '12:00 pm';
$interval = 10;

$start_ts = strtotime($start);
$end_ts = strtotime($end);

while ($start_ts <= $end_ts)
{
echo date('H:i:s', $start_ts) . '<br>';
$start_ts += $interval * 60;
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum