I used the strtotime function to save the date as an int in my mysql table like this:
PHP Code:
$date = strtotime($_POST['TxtDate']);
Now I'm trying to pull that number from the table using the date function like this: But it either displays Dec 1969 or just displays the int value. Any suggestions?
PHP Code:
$alldata = mysql_num_rows($num_result);
$result=mysql_query ("SELECT * FROM tablex ORDER BY num_id LIMIT ".$_POST['start'].", ".$_POST['limit']."") or die (mysql_error ());
$data = array();
while ($row=mysql_fetch_object($result))
{
$data [] = $row;
$num_id= $data['num_id'];
$datex = date('m-d-Y', $data['datex']);
}
Bookmarks