adding date to datebase - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: adding date to datebase (/showthread.php?tid=51677) |
adding date to datebase - El Forum - 05-13-2012 [eluser]Mohammed Zayan[/eluser] I use this code in my model Code: function addBook($photo_link){ but creation_date field like this 0000-00-00 Is the way I use wrong? adding date to datebase - El Forum - 05-13-2012 [eluser]Mohammed Zayan[/eluser] my table structure in this photo http://im26.gulfup.com/2012-05-13/1336919768201.jpg I think it will help. adding date to datebase - El Forum - 05-13-2012 [eluser]InsiteFX[/eluser] If using a MySQL DateTime field then use this. Code: $now = date("Y-m-d H:i:s"); adding date to datebase - El Forum - 05-14-2012 [eluser]Mohammed Zayan[/eluser] Thank you now it works |