How to insert only one username and password in SQLite database?

前端 未结 5 1045
鱼传尺愫
鱼传尺愫 2020-12-12 03:55

I have an application where I have two textfields and a button. In the first textfield I am entering the username of the user and in the second textfield I am entering the p

5条回答
  •  抹茶落季
    2020-12-12 04:15

    If I understood your requirement correctly, You can follow the below guideline.

    Before inserting the data to the table, You can check if any record is added to the table.
    If the count is 0, you can proceed to insert the record, else you can prompt the error.

    I think this will be the simplest way to do this.

提交回复
热议问题