i need to put this into mysql table
***************************
2003-01-07 01:56:44 : back_up
2003-01-07 01:34:47 : down
****************************
is this right way to do that?
$f_data = file($filename);
foreach($f_data as $str)
$result=(ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2} \s ([0-9]{1,2})[0-9]{1,2})[0-9]{1,2})", $str, $matches));
if ($result) {
$sql = "INSERT INTO downuptable VALUES ('STP', '$down', '$up') order by datetime";
??????
thx in advance
***************************
2003-01-07 01:56:44 : back_up
2003-01-07 01:34:47 : down
****************************
is this right way to do that?
$f_data = file($filename);
foreach($f_data as $str)
$result=(ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2} \s ([0-9]{1,2})[0-9]{1,2})[0-9]{1,2})", $str, $matches));
if ($result) {
$sql = "INSERT INTO downuptable VALUES ('STP', '$down', '$up') order by datetime";
??????
thx in advance