开发者

SQLite Commands to Store Date and Float values

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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜