angularjs - How to insert username password into sqlite on login If not exists? -


i want insert username , password sqlite on login if not exists, because want keep registration , login db separately.

how can check , insert?

you can update table schema following , push insert query.

create table tbllogin (id integer primary key autoincrement, username varchar, password varchar, unique(username) on conflict ignore) 

on conflict ignore ignore insert query if username still exist in table.

just make clear, last_insert_rowid() still return valid id if insert query ignored , database connection same invoked function. reference here.

hope helps.


Comments

Popular posts from this blog

java - Ebean enhancement ignores a model -

javascript - Reference error while trying to encapsulate an animation function -

SQL php on different pages to Insert (mysqli) -