Redlightpacket Posted September 29, 2009 Share Posted September 29, 2009 Some how the line below will not work. I'm trying to make the current date input into the database when I insert data into the database. $query = "CREATE TABLE IF NOT EXISTS _0_calendar_data(id SMALLINT NOT NULL AUTO_INCREMENT PRIMARY KEY, news TEXT(1200), date INT(30), date2 INT(30))"; //The one right here needs attention $result = "INSERT INTO _0_calendar_data(id, news, date, date2) VALUES (NULL, '$news', 'YEAR: Auto CURDATE()', CURDATE())"; Link to comment https://forums.phpfreaks.com/topic/175885-insert-date-in-mysql-problem/ Share on other sites More sharing options...
fenway Posted October 5, 2009 Share Posted October 5, 2009 You can't store dates as INTs and use CURDATE() -- not to mention strings. Link to comment https://forums.phpfreaks.com/topic/175885-insert-date-in-mysql-problem/#findComment-930746 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.