strange insert on Access table

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
mcog_esteban
Forum Contributor
Posts: 127
Joined: Tue Dec 30, 2003 3:28 pm

strange insert on Access table

Post by mcog_esteban »

hi all
can someone help with this:
i have this simple sql statement:

$title = addslashes($title);
$sql = "insert into project (project_title) values('$title');
but i got an error when inserting ex: $title = "project's name"

if i change $sql to:

$title = addslashes($title);
$sql = 'insert into project (project_title) values("'.$title.'");
i get a diferent error using the same value, but if i copy paste the statement
and run it on MS Access, i get no problem.

Does anyone had such similar problems whem using php+access using odbc?
thanks.
mcog_esteban
Forum Contributor
Posts: 127
Joined: Tue Dec 30, 2003 3:28 pm

Post by mcog_esteban »

hi..i just found the solution to my problem
here: http://www.devguru.com/features/knowled ... 00206.html
Post Reply