acctman Posted May 28, 2009 Share Posted May 28, 2009 i have a mysql field that is format for DATE 0000-00-00 i was using the code below to added the date but it's not inserting error: Fatal error: Call to undefined function: curdate() mysql_query("INSERT INTO rate_referrals (ref_by,ref_mem,ref_set,ref_status,ref_date) VALUES ({$row['m_id']},'$id','$points',0,'".CURDATE()."')"); Link to comment https://forums.phpfreaks.com/topic/160044-solved-mysql-date-insert/ Share on other sites More sharing options...
JonnoTheDev Posted May 28, 2009 Share Posted May 28, 2009 Because it is a MYSQL function not PHP mysql_query("INSERT INTO rate_referrals (ref_by,ref_mem,ref_set,ref_status,ref_date) VALUES ('".$row['m_id']."','".$id."','".$points."',0,CURDATE()"); Link to comment https://forums.phpfreaks.com/topic/160044-solved-mysql-date-insert/#findComment-844302 Share on other sites More sharing options...
acctman Posted May 28, 2009 Author Share Posted May 28, 2009 thanks that worked perfectly Link to comment https://forums.phpfreaks.com/topic/160044-solved-mysql-date-insert/#findComment-844316 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.