Jacob
Security and stability first, you should be using Paramaterized Queries. Robert has an excellent write-up here http://sqlite.phxsoftware.com/forums/t/83.aspx.
If you want unique values in a table, use unique indexes. And to avoid an sql error when attempting to insert, use "insert or ignore".
Notice below I create a table with 3 cols, 2 of which together are a unique index. I use insert or ignore and I do not get an error when I attempt to insert a duplicate. It silently fails. If you remove "or ignore" you will get an sqliteexception.
C:\sqlite>sqlite3.exe testdb.db
SQLite version 3.5.1
Enter ".help" for instructions
sqlite> create table people (lastname text, firstname text, salary double);
sqlite> create unique index people_unique_1 on people (lastname, firstname);
sqlite> insert or ignore into people values ('smith', 'john', 44548.33);
sqlite> select * from people;
smith|john|44548.33
sqlite> insert or ignore into people values ('smith', 'john', 44548.33);
sqlite> select * from people;
smith|john|44548.33
sqlite> insert or ignore into people values ('smith', 'linda', 44548.33);
sqlite> select * from people;
smith|john|44548.33
smith|linda|44548.33
sqlite>