dbTalk Databases Forums  

Problem in search when value contents single quote (') in whereclause

comp.databases comp.databases


Discuss Problem in search when value contents single quote (') in whereclause in the comp.databases forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
babal
 
Posts: n/a

Default Problem in search when value contents single quote (') in whereclause - 08-27-2008 , 12:58 AM






Hello Everyone,

I m facing a issue, in search condition in where clause to be very
specific.

I have a table events which has title column with varchar(255) data
type.
When user enters single quote (') in it there is no issue with insert
or update but when i search for that specific record, i m getting no
resulted row.

version Details:
PHP 4.4.0
MySQL 4.3
Apache 1.3

I have tried mysql_escape_string also but no luck.

Sample Entry of the record is: babal's First event (same value i have
in the database).

thanks & Regards
Babal

Reply With Quote
  #2  
Old   
Lennart
 
Posts: n/a

Default Re: Problem in search when value contents single quote (') in whereclause - 08-27-2008 , 10:55 AM






On Aug 27, 7:58*am, babal <lokeshjadw... (AT) gmail (DOT) com> wrote:
Quote:
Hello Everyone,

I m facing a issue, in search condition in where clause to be very
specific.

I have a table events which has title column with varchar(255) data
type.
When user enters single quote (') in it there is no issue with insert
or update but when i search for that specific record, i m getting no
resulted row.

version Details:
PHP 4.4.0
MySQL 4.3
Apache 1.3

I have tried mysql_escape_string also but no luck.

Sample Entry of the record is: babal's First event (same value i have
in the database).

Try:

babal''s First event

/Lennart



Reply With Quote
  #3  
Old   
Lennart
 
Posts: n/a

Default Re: Problem in search when value contents single quote (') in whereclause - 08-27-2008 , 10:55 AM



On Aug 27, 7:58*am, babal <lokeshjadw... (AT) gmail (DOT) com> wrote:
Quote:
Hello Everyone,

I m facing a issue, in search condition in where clause to be very
specific.

I have a table events which has title column with varchar(255) data
type.
When user enters single quote (') in it there is no issue with insert
or update but when i search for that specific record, i m getting no
resulted row.

version Details:
PHP 4.4.0
MySQL 4.3
Apache 1.3

I have tried mysql_escape_string also but no luck.

Sample Entry of the record is: babal's First event (same value i have
in the database).

Try:

babal''s First event

/Lennart



Reply With Quote
  #4  
Old   
Lennart
 
Posts: n/a

Default Re: Problem in search when value contents single quote (') in whereclause - 08-27-2008 , 10:55 AM



On Aug 27, 7:58*am, babal <lokeshjadw... (AT) gmail (DOT) com> wrote:
Quote:
Hello Everyone,

I m facing a issue, in search condition in where clause to be very
specific.

I have a table events which has title column with varchar(255) data
type.
When user enters single quote (') in it there is no issue with insert
or update but when i search for that specific record, i m getting no
resulted row.

version Details:
PHP 4.4.0
MySQL 4.3
Apache 1.3

I have tried mysql_escape_string also but no luck.

Sample Entry of the record is: babal's First event (same value i have
in the database).

Try:

babal''s First event

/Lennart



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.