sqlite - How to append an integer to a const char value in iphone? -


I have a SQL query statement that was used to display the content in the table. The Sql statement contains such a section, the addition of numerical value as 1, 2 3 etc. depends on the material already selected. I'm assuming numerical as integer and I want to add it to the sql statement which has four values. I can add both values. Please help me out

My query ==> select * from book where id = 1;

I have an ID value integer

thanks.

You force the parameter eg:

  sqlite3 * Db; ... // open database sqlite3_stmt * pStmt; Sqlite3_prepare_v2 (db, "choose from book, where id =?", -1, and pstmt, tap); Sqlite3_bind_int (pstmt, 1, bookId);  

See the SQLite document and the prepared statement. You can reuse the statement more than once. Lets you reset the price


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -