A customer of ours uses a Database called DataFlex (which IMHO crap) after a week of trying to use their Web Suite (see above opinion) I finally found an ODBC driver for it and can now use PHP.
Except....
I cannot SQL UPDATE or INSERT a date field. I can query a date, display it etc. I can update any other type of field but not a date. Unless, I set the date to NULL.
$db = odbc_connect("DataFlex", "foo", "bar", );
//this works (non date field)
$query = "UPDATE pod_h SET signed_for_by = 'Aaron G. Harding' WHERE airbill_number = '$airbill_number'";
odbc_exec($db, $query);
//this does not
$query = "UPDATE pod_h SET delivered_date = '2001-01-01' WHERE airbill_number='$airbill_number'";
odbc_exec($db, $query);
I have tried multiple date formats, mktime(), etc. But cannot get a date to UPDATE (unless its NULL).
Anybody got any ideas? Anything... would be good. Its driving me nuts. Its seems so simple...
Thanks
-Aaron Kremin
ask@aecnow.com