SQLite4Unity3d icon indicating copy to clipboard operation
SQLite4Unity3d copied to clipboard

Update a specific Value in table

Open shahanbutt opened this issue 8 years ago • 4 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.

shahanbutt avatar Jul 17 '17 10:07 shahanbutt

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

shahanbutt avatar Jul 17 '17 13:07 shahanbutt

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?

yggoon avatar Mar 14 '18 16:03 yggoon

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

hikariakio avatar Jul 19 '18 16:07 hikariakio

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

afandiyusuf avatar Aug 28 '18 10:08 afandiyusuf