开发者

Sqlite3 update statement problem

开发者 https://www.devze.com 2022-12-31 01:01 出处:网络
how to create SQl statement for update using \'where\' condition 开发者_C百科with \'name\', how to bind this name to sql statement...

how to create SQl statement for update using 'where' condition 开发者_C百科with 'name', how to bind this name to sql statement...

///example 
const char *sql = "update profile set name = ? ,Lname = ?, date = ?,phno = ? ,image = ? , id= ? where **name=?**;";


What is the problem? You can just use sqlite3_bind() Each parameter has a numbered index starting at 1. You just call sqlite3_bind() for each of the question marks. The first 'name' is parameter number 1 and the second one is parameter number 7.

0

精彩评论

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