Click to See Complete Forum and Search --> : PHP, Access and Apostrophe's


saint-troy
02-21-2008, 09:46 AM
Hey everyone,

So here's the deal, I have a PHP app that sends data to an Access database which then generates a report.

Unfortunately some of the data contains an apostrophe which bombs my insert statement. Of course if I escape the apostrophe I am left with a \' in the reports. Anyone know a way I can handle that ' in the INSERT statement or conversely a way to automatically clean it out of access? cleaning these reports after the fact are sucking the life out of me :|

NogDog
02-21-2008, 11:26 AM
For Access, you escape an apostrophe with another apostrophe, not a back-slash. So "Joe's Bar and Grill" would need to be escaped as "Joe''s Bar and Grill".