robertohuertasm / SQLite4Unity3d

SQLite made easy for Unity3d
MIT License
1.28k stars 265 forks source link

Update a specific Value in table #69

Open shahanbutt opened 7 years ago

shahanbutt commented 7 years ago

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.

shahanbutt commented 7 years ago

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); }

yggoon commented 6 years ago

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?

hikariakio commented 6 years ago

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

afandiyusuf commented 6 years ago

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);