开发者

Bind Boolean value in Sqlite

Anyone have idea about how to bind Boolean in sqlite with objective - c.

i know how to bind int and string but i don't know about boolean value.

sqlite3_bind_int(addStmt, 1, id);
sqlite3_bind_text(addStmt,3 ,[message UT开发者_StackOverflowF8String], -1,  SQLITE_TRANSIENT);  

but how can i bind boolean value.

Please help me.

Thanks you


SQLite does not distinguish booleans from ints. So you can just use bind_int. The only real storage classes are NULL, INTEGER, REAL, TEXT, and BLOB. Note:

"But as soon as INTEGER values are read off of disk and into memory for processing, they are converted to the most general datatype (8-byte signed integer)."

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜