robertohuertasm / SQLite4Unity3d

SQLite made easy for Unity3d

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update a specific Value in table

shahanbutt opened this issue · comments

I connected my table with unity. I am getting all the data from the tables. But now i wanted to update the row values or a specific value from a row. How can i do it? I couldnt figure that out.

this is what i did and its working for me :
public void ChangeUserCurrentCar(int userID,int currnetCarNumb)
{
_connection.Execute ("Update UserTable set currentCar=" + currnetCarNumb + " where
ID="+userID);
}

Yes I have the same problem I don't know how I can Update and Delete.
And if your script working where you write this method, in DataService.cs?

Have u guys tried to achieve that? please suggest me how to do

My script for update. I want to update my screenshot.isUploaded to true.

Screenshot ret = _connection.Table<Screenshot> ().Where (x => x.isUploaded == false).First (); ret.isUploaded = true; _connection.Update (ret);