Hi,
I am having trouble inserting data into a datetime field in MSSQL. Here is the script I am trying to execute:
[php]
$now = date('d/m/Y g:i:s A');
mssql_query("IN SERT INTO clients (created,modifi ed,firstname,la stname,address, address2,addres snotes,city,pro vince,countryII D,postalcode,ho mephone,passwor d,email) VALUES
('$now','$now', '$firstName','$ lastName','$add ressSubmit','$a ddress2','$addr essnotes','$cit y','$province', '$countryIID',' $postalcode','$ homephone','$pa ssword','$email Address')");
[/php]
Yet, when i look into the database, the created and modified fields (which are datetime format) show 'NULL', and if I change $now='', the created and modified fields show 01/01/1900
Any help would be appreciated. Thanks.
I am having trouble inserting data into a datetime field in MSSQL. Here is the script I am trying to execute:
[php]
$now = date('d/m/Y g:i:s A');
mssql_query("IN SERT INTO clients (created,modifi ed,firstname,la stname,address, address2,addres snotes,city,pro vince,countryII D,postalcode,ho mephone,passwor d,email) VALUES
('$now','$now', '$firstName','$ lastName','$add ressSubmit','$a ddress2','$addr essnotes','$cit y','$province', '$countryIID',' $postalcode','$ homephone','$pa ssword','$email Address')");
[/php]
Yet, when i look into the database, the created and modified fields (which are datetime format) show 'NULL', and if I change $now='', the created and modified fields show 01/01/1900
Any help would be appreciated. Thanks.
Comment