-1

is there an Equivalent function of mysql_real_escape_string() in Objective-C?

I'm trying to insert a string with an allowed characters ('") to a db.

ztirom
  • 4,382
  • 3
  • 28
  • 39
אVי
  • 1,913
  • 6
  • 22
  • 35
  • 3
    iOS has built-in SQLite3 support, I suppose you can thus use the SQLite3 C API. In this case, use prepared statements and `sqlite3_bind_text()` function. –  Jan 25 '14 at 20:57

1 Answers1

0

You could use CFURLCreateStringByAddingPercentEscapes with the right params.

See Escape Quotes in Objective-C

Community
  • 1
  • 1
Daij-Djan
  • 49,552
  • 17
  • 113
  • 135