For Storing Values in SQLite.I wrote the below code in -(void)ini开发者_如何转开发tWithPrimaryKey method.
self.name = [NSString stringWithUTF8String:(char *)sqlite3_column_text(init_statement, 0)];
this is for string. what should i write if i wanna save date and a float value?? should i write the same thing??
As i Copied this code from a tutorial can someone tell me what that '0' at the last stand for?
If you don't wish to work with raw sqlite, the open-source FMDB is a commonly-used Cocoa wrapper for sqlite.
use this one
if insert
sqlite3_bind_double(init_statement, 1, date);
if retrieve date then
double Date= sqlite3_column_double(init_statement, 1);
精彩评论