0

I need to enter:

your's faithfully

into the database but it does not insert into the database. I'm using php and mysql. **

I'm doesnt talking about sql injection. I want to insert '(single quote) into my mysql table field.

If anyone already face this problem , please share...

Kavin D
  • 1
  • 6
  • Double it, e.g. `your''s faithfully` to get `your's faithfully`. – jarlh Apr 28 '16 at 14:42
  • 3
    It should also be pointed out that *your's faithfully* is grammatically incorrect. But yes, SQL Injection and all that jazz. – Siyual Apr 28 '16 at 14:45
  • 1
    @chris85, ANSI SQL, I assume it works in MySQL too. – jarlh Apr 28 '16 at 14:53
  • @jarlh yup, you are correct, worked on sqlfiddle. – chris85 Apr 28 '16 at 15:54
  • @jarlh , i got the word(your's faithfully) from client android app. How to identify the particular word and tell me the logic to double the single quotes programatically from group of words. – Kavin D Apr 29 '16 at 02:39
  • @chris85 correct that it works but incorrect that it should be suggested like that with php... – Prix Apr 29 '16 at 02:40
  • @KavinD you don't, simple use prepared statement. Did u even bother to look at the link at the top of your question? It's right below where it says [`This question already has an answer here:`](http://stackoverflow.com/questions/60174/how-can-i-prevent-sql-injection-in-php) – Prix Apr 29 '16 at 02:40
  • @Prix Thanks.. I got it.. – Kavin D Apr 29 '16 at 03:31

0 Answers0