Results 1 to 5 of 5
Dec 13, 2008, 20:36 #1
Postgres and characters from MSWord causing problems on insert/update
Okay, I have a client that has been running a web application on a codebase for a couple of years without any kind of problems.
This site is created in PHP, Smarty Templates, ADODB and a Postgres database.
I have started to receive a number of help requests from them because of errors that are now popping up in regarding to people trying to insert data into the database via the forms on the website.
Here is a sample sentence that is causing an error:
'The Jury Clerk is responsible for the work of the District Clerk’s Office in connection with qualifying, managing, and paying jurors for service.'
Now, I know tha tthe problem is with the apostrophe in the word 'Clerks'.
Here is our insert statement:
$sql = "INSERT INTO table_name (col1, col2, col3) VALUES (?,?,?)";
$db->Execute($sql, array($var1, $var2, $var3)) or die("Error in query: $sql. " . $db->ErrorMsg());
Okay, this has never been a problem until we found out that people were using Microsoft Word 2007 to create the text that they were going to enter into the website and then copy and paste it into the web form.
Can anyone shed light on why if I manually type this information into the form, the form works as expected, but if I copy it from Word 2007 - it fails?