944,111 Members | Top Members by Rank

Ad:
  • MySQL Discussion Thread
  • Marked Solved
  • Views: 787
  • MySQL RSS
Oct 24th, 2009
0

Special chars in Insert query...

Expand Post »
Hello guys, how can to make correct query if in the typed values have a special chars (e.g. ' ") ?

If the typed values have a one special char I know how to make the correct query, but if it have more then one special chars then I don't know how to make the correct query... can someone help me ?

Thanks.
Reputation Points: 17
Solved Threads: 5
Junior Poster
Krstevski is offline Offline
110 posts
since May 2009
Oct 25th, 2009
0
Re: Special chars in Insert query...
Use \ before any special character. If you using PHP, then use mysql_real_escape_string() function.
Reputation Points: 29
Solved Threads: 47
Posting Whiz
mwasif is offline Offline
312 posts
since Dec 2007
Oct 25th, 2009
0
Re: Special chars in Insert query...
Thanks so much mwasif
Reputation Points: 17
Solved Threads: 5
Junior Poster
Krstevski is offline Offline
110 posts
since May 2009
Oct 25th, 2009
0
Re: Special chars in Insert query...
You are welcome.
Reputation Points: 29
Solved Threads: 47
Posting Whiz
mwasif is offline Offline
312 posts
since Dec 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MySQL Forum Timeline: My data not appear
Next Thread in MySQL Forum Timeline: mySQL permissions ... a few newbie questions





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC