[thelist] Inserting dates and booleans into MS Access
Jay Blanchard
jay.blanchard at niicommunications.com
Wed Jan 19 08:20:46 CST 2005
[snip]
> Now, what about the checkboxes?
Yeah.. I got a little over-excited!
Still got these to worry about.
I tried converting the boolean values of the variables I'm using to
strings, so that instead of the SQL looking like:
INSERT INTO tblStudents
(name, username, password, permissions, website, displayUser)
VALUES ('jon','dfg','gdfd','20-Jan-05','student','0','1');
it looks like:
INSERT INTO tblStudents
(name, username, password, permissions, website, displayUser)
VALUES ('jon','dfg','gdfd','student','False','True');
This didn't work either. The format setting in Access is set to
True/False, not Yes/No or On/Off.
Any suggestions?. it seems that PHP must ALWAYS contain the single
quotes with each value to obtain correct syntax.
[/snip]
Have you echo'ed the results out to the screen? you could write a
function to handle checkboxes...
function CheckBoxToValue($checkBox){
if($checkBox == "on"){
return True;
}else{
return False;
}
}
This returns boolean values, not strings
More information about the thelist
mailing list