Hi, I recently encountered a problem with a little DB application i wrote, when I enter a single quote in a string it malforms my SQL query. I could replace all the single quotes in strings before I assemble the query, but i would prefer if i could do it in the routine that sends the querys to database, but my tries to get a regex, that replaces only the single quotes in the actual strings have not been successful and i could not find a solution on the net. So I hope i can find a solution here.
example string : UPDATE SET column = 'foo bar' bar foo' foo bar',\n
Any help is appreciated WoodmanIn reply to Escape single quotes in a SQL query by Woodman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |