On Jun 14, 2008, at 10:39 AM, Daniel White wrote: > Hi guys, > > My first post to this list, and I'm new to SQL in general too. > > Just a couple of questions to start: > > ***1: > In the sqlite3_prepare_v2 function, can someone explain > to me the 5th parameter better than the site's help can? > > I quote: > /* OUT: Pointer to unused portion of zSql */ > > I'm a bit perplexed. zSql is just the SQL query string. > There isn't an unused portion really, and even if there > was, I can't imagine how it could be of use. I just want > SQlite to process the string up to the NULL terminator. > > I tend to use 0. eg: > sqlite3_prepare_v2(database,sqlstring,-1,&ppStmt,0); > > It seems to 'work'. However, I'm still curious as to what > that 5th parameter really does, or why you really need it.
For when you have a string containing more than one SQL statement. i.e. "INSERT INTO songs VALUES(...) ; INSERT INTO songs VALUES(...) ; ..." If this string is passed to sqlite3_prepare_v2, the unused portion begins right after the first semi-colon. > ***2: > When I use the SQL query string: > "SELECT * FROM songs WHERE SongTitle like 'hexion'" > The song title is actually 'Hexion'. By default LIKE is case- insensitive, = is not. Dan. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users