MySQL Forums
Forum List  »  PHP

error updating table...
Posted by: Reham G
Date: July 09, 2005 08:08AM

look at this

$x="i've been there";

update table set memofield='$x' where cond;

this gives me error and when i echo this sql statement in the page i found that the error is right coz the ' in i've terminates field

that is the sql st. becomes

update table set memofield='i've been there' where cond

but i can't get over it coz $x is supposed to be filled in with the user and if the user write any ' in it it yields error ...................

how can i get over it !!!!!

Options: ReplyQuote

Written By
error updating table...
July 09, 2005 08:08AM

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.