Re: Access and PHP problem
| From: | Justin Patrin | Date: | Thu, 15 Jan 2004 01:03:38 +0000 |
| Subject: | Re: Access and PHP problem | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-32398@lists.php.net to get a copy of this message | ||
Jason Hawkins wrote:
Hi, I am trying to INSERT into a MSAccess database using PHP 4.3 - I have a problem when I enter a name like O'Donnell. In mysql I would normally just backslash the single quote but this doesn't work with MSAccess. is there a fix for this?? Thanks in adv. JasonMost DBs allow you to use '' to quote a single quote. So: INSERT INTO table (name) VALUES ('O''Donnel'); Or you could do the obvious and use: INSERT INTO table (name) VALUES ("O'Donnel"); But that doesn't work with, say Oracle. (mysql handles both quotes just fine) -- paperCrane <Justin Patrin> -- Question Everything, Reject Nothing