Jump to content

[SOLVED] Can't update date field - mysql client version 5.0.33


sayedsohail

Recommended Posts

Hi Everyone,

 

I am trying to update record and date field, but it fails although my timestamp echos perfectly.  I don't know what to do:  my sql client version is 5.0.33 and the model table has got date filed which is model_date.

 

Its been since morning, no success, please help guys. here is my code.  million thanks

 

 

$timestamp = date('Y-m-d', strtotime($displaydate)); 
echo "The string to date is :$timestamp"; 

$addsql = "UPDATE models  
SET make = '$fm', model= '$fmod', description = '$fd' model_date = '$timestamp' WHERE id = '$fid' "; 
mysql_query($addsql);  

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.