jim.davidson Posted May 8, 2007 Share Posted May 8, 2007 I'm using dreamweaver8, php and mySQL 4.1.21 update_date is a hidden field in my form: <input name="update_date" type="hidden" id="update_date" value="now()" /> My received_date field is not being updated, any ideas why? if ($_POST['received'] = 'y') { $updateSQL = sprintf("UPDATE orders SET received_by=%s, received=%s, received_date=%s WHERE order_id=%s", GetSQLValueString($currentUser, "int"), GetSQLValueString($_POST['received'], "text"), GetSQLValueString($_POST['update_date'], "date"), GetSQLValueString($_POST['order_id'], "int")); mysql_select_db($database_imcrecycle, $imcrecycle); $Result1 = mysql_query($updateSQL, $imcrecycle) or die(mysql_error()); } Quote Link to comment https://forums.phpfreaks.com/topic/50539-solved-date-field-not-updating/ Share on other sites More sharing options...
fenway Posted May 8, 2007 Share Posted May 8, 2007 Echo $updateSQL and post it here. Quote Link to comment https://forums.phpfreaks.com/topic/50539-solved-date-field-not-updating/#findComment-248500 Share on other sites More sharing options...
bubblegum.anarchy Posted May 9, 2007 Share Posted May 9, 2007 now() should not be quoted, assuming that the GetSQLValueString() function returns a quoted string. Quote Link to comment https://forums.phpfreaks.com/topic/50539-solved-date-field-not-updating/#findComment-248790 Share on other sites More sharing options...
jim.davidson Posted May 9, 2007 Author Share Posted May 9, 2007 I worked around the problem by not using dreamweaver's GetSQLValueString() function Quote Link to comment https://forums.phpfreaks.com/topic/50539-solved-date-field-not-updating/#findComment-249073 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.