The reason I ask is, I'm having a problem processing rows in a table that
contain single quotes (specifically, the PHP code I wrote that allows the
user to duplicate a row doesn't work if the a field in the row has a single
quote in it).
Would it be better for me to strip out the single quotes
René Fournier [EMAIL PROTECTED] wrote:
The reason I ask is, I'm having a problem processing rows in a table that
contain single quotes (specifically, the PHP code I wrote that allows the
user to duplicate a row doesn't work if the a field in the row has a
single
quote in it).
Try
Try addslashes() before executing the query and stripslashes() when
retrieving data from the db. See the online manual for more
details.
I think stripslashes() isn't needed when retrieving data from the db,
it is needed only in the query string to protect special chars from
interpretting
Arpad Tamas [EMAIL PROTECTED] wrote:
I think stripslashes() isn't needed when retrieving data from the db,
it is needed only in the query string to protect special chars from
interpretting them as sql.
I want to say this isn't true, but maybe that depends on the configuration
of PHP (I'm
4 matches
Mail list logo