Baruch Burstein <bmburst...@gmail.com> wrote: > What is the difference between > >> mprintf("insert into a values(%Q);", val); >> > and > >> mprintf("insert into a values('%q');", val);
Read the fine manual: http://www.sqlite.org/c3ref/mprintf.html The %Q option works like %q except it also adds single quotes around the outside of the total string. Additionally, if the parameter in the argument list is a NULL pointer, %Q substitutes the text "NULL" (without single quotes). So, the difference is in what happens when val is NULL. -- Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users