Let the DB do the work, have a table represent a users apps. Then you could simply count, add, delete...
Adding values to rows, retrieving them and splitting them
문제
I have a MySQL database with column 'apps_owned'. Everytime a user buys an app, I want their row to have the AppID added to it. For example,
apps_owned = 1, 4, 75 etc.
How would I do this?
Next, I need to split these up into individual numbers in C#. I don't know how I would remove the comma's to get a whole number. Is there any way of doing this. I know how to get the numbers from the database, I just don't know how to add to them or split them. Is there any easier way to do this?
올바른 솔루션이 없습니다
다른 팁
To Split you can do something like:
var result = apps_owned.Split(' ').Select(x => int.Parse(x.ToString.Replace(",", ""))).ToArray<int>();
제휴하지 않습니다 StackOverflow