I'm running PHP5 on XP, and I want to write to an Access database.
I'm using the COM object.
I try to do this:
$insert = "INSERT INTO Fourth_Sixth_Floor (Today, Hour, Fourth, Sixth, LHC, LHD) VALUES (#".$_POST['today']."#,
#".$POST['hour']."#,".$POST['fourth'].",".$POST['sixth'].",".$POST['lectureC'].",".$_POST['lectureD'].")";
printing out $insert returns:
INSERT INTO Fourth_Sixth_Floor (Today, Hour, Fourth, Sixth, LHC, LHD) VALUES (#01/04/05#, #4:01:15 PM#,0,0,0,0)
Welp, it doesn't work.
If I extract just the Hour attribute, it works fine, posts my data and I can look at it.
The problem is with the time.
I always thought Access took time like this:
#9:30:00 PM#
If I hardcode the time instead of using my POST variable I get the same problem. Did it everyway I can think of short of making the attribute a string and storing it that way.
I'm a bit confused.
If the attribute Today works, which i derived with the PHP date() function, then why doesn't the time work.
Any help...
This is a work project and I'm kinda stuck working with Access and PHP on windows, not my first choice.
ciao
thanks