Jump to content

Insert Date in MySQL Problem


Redlightpacket

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.