I altered a table in MySQL to be a timestamp so I could see when a user was created:
ALTER TABLE `users` CHANGE `created_date` `created_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ;
Using CodeIgniter I queried the database and got my row results for all users:
$this->db->get('users');
In my view I'm trying to display the results using PHP date():
<?php echo date("d-m-Y", $row->created_date); ?>
and I'm getting this error message, which I don't understand:
Severity: Notice
Message: A non well formed numeric value encountered
Filename: users/view_all_users.php
Line Number: 19
where by itself:
<?php echo $row->created_date ?>
produces:
01-01-1970 0000-00-00 00:00:00
Any ideas what I've done wrong?