Well i built my website to write dates to database column in the following format: 2014/04/01
Now i've come to realize this is not helpful when i want to sort by date or manipulate date so i decided to change all date to to timestamps.
i applied the following fix :
$sql = mysql_query("SELECT * FROM TABLE")or(die(mysql_Error()));
while($info = mysql_fetch_array($sql)){
$newdate = strtotime($info['date']);
mysql_query("UPDATE TABLE SET date = '$newdate' WHERE id = $info[id]")or(die(mysql_error()));
}
the problem is all the date columns are empty now, What am i doing wrong ?