Page 1 of 1

strange insert on Access table

Posted: Wed Nov 17, 2004 2:35 pm
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.

Posted: Wed Nov 17, 2004 4:29 pm
by mcog_esteban
hi..i just found the solution to my problem
here: http://www.devguru.com/features/knowled ... 00206.html