[sqlite] sqlite3_mprintf and Prepare

2008-03-26 Thread Mahalakshmi.m
Igor Tandetnik Wrote: >The first case is slower, since it has to make an extra sqlite3_mprintf >call (that achieves precisely nothing). Thanks a lot Igor.Its am clear now. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/

Re: [sqlite] sqlite3_mprintf and Prepare

2008-03-26 Thread Igor Tandetnik
"Mahalakshmi.m" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I want to know why we have to use sqlite3_mprintf before > sqlite3_prepare() We don't; wherever did you get this idea from? > Case 1: > Query = sqlite3_mprintf ("DELETE FROM MUSIC WHERE URL = ?;"); > sqlite3_prepare(db,

[sqlite] sqlite3_mprintf and Prepare

2008-03-26 Thread Mahalakshmi.m
Hi, I want to know why we have to use sqlite3_mprintf before sqlite3_prepare() Case 1: Query = sqlite3_mprintf ("DELETE FROM MUSIC WHERE URL = ?;"); sqlite3_prepare(db, Query ,-1,&stmt,0); sqlite3_free(Query); case 2: We can also use directly - sqlite3_prepare(db, "DELETE FROM MUSIC WHERE URL =