Special chars in Insert query...

Thread Solved

Join Date: May 2009
Posts: 29
Reputation: Krstevski is an unknown quantity at this point 
Solved Threads: 0
Krstevski's Avatar
Krstevski Krstevski is offline Offline
Light Poster

Special chars in Insert query...

 
0
  #1
30 Days Ago
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.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 190
Reputation: mwasif is an unknown quantity at this point 
Solved Threads: 25
mwasif mwasif is offline Offline
Junior Poster
 
0
  #2
30 Days Ago
Use \ before any special character. If you using PHP, then use mysql_real_escape_string() function.
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 29
Reputation: Krstevski is an unknown quantity at this point 
Solved Threads: 0
Krstevski's Avatar
Krstevski Krstevski is offline Offline
Light Poster
 
0
  #3
30 Days Ago
Thanks so much mwasif
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 190
Reputation: mwasif is an unknown quantity at this point 
Solved Threads: 25
mwasif mwasif is offline Offline
Junior Poster
 
0
  #4
30 Days Ago
You are welcome.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC