Inserting and updating failure
I have a form that people fill out, once filled the information is uploaded to the mysql DB. Recently we started having the issue where if there is an ' it fails on the upload. I read this page and it didn't really help me:
http://dev.mysql.com/doc/mysql/en/insert.html
What I think is happening is the ( ' ) in the the text field (title for example), that entered info into, is killing my statement:
$sql = "UPDATE property SET title='$title', sale='$sale' WHERE propertykey=$id";
How can I fix this? If my analysis is correct, is there a way to search the string in $title, look for an ( ' ) and replace it with \' instead?
Subject
Written By
Posted
Inserting and updating failure
August 31, 2005 10:22AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.