0

I want to store an html description tag into a sqlite database. Basically I convert the tag to a string but when I try to insert it into the database i get a near"0": syntax error. does anyone know of a way I can store the string?

3
  • How are you attempting to insert the string? Possible duplicate of: stackoverflow.com/questions/12094120/… (which doesn't have a selected answer, but should help you) Commented Dec 11, 2013 at 21:56
  • @powerj1984 sorry, thanks for the link Commented Dec 11, 2013 at 22:01
  • No problem, hope it helps Commented Dec 11, 2013 at 22:11

1 Answer 1

0

I would recommend to use FMDatabase (https://github.com/ccgus/fmdb) as a SQLite wrapper for iOS/Cocoa. FMDatabase is a very popular framework, used in endless projects and well maintained. I heavily use it for more than 4 years.

Code sample:

FMDatabase *db; // Your DB object
[db executeUpdate:@"INSERT INTO table (key,value) VALUES (?, ?)", yourKey, longHtmlString, nil];
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.