I needed to add 1 to certain values in an ArrayList and this was the only way I could figure it out easily.
It is basically calling to set q3 at location 1 with the former q3 value +1. IN this case 6+1=7;
Showing posts with label adding variables. Show all posts
Showing posts with label adding variables. Show all posts
Thursday, December 27, 2012
Sunday, December 23, 2012
SQLite Android and Variables
While working on a project I recently realized I was going to have to learn, or try, to save to a database. I trolled hundreds of samples and examples and after a while got a grasp. The thing that stumped me hard was if I wanted to implement a variable in the mix, or two, or an ArrayList.
Here is a brief synopsis should you encounter it.
Here is the easy way to iterate some of a db with a ListArray. Notice the " These are the crucial differences from being in sql and not.
Here is the way to update something with a variable. BOTH ways work, just showing them. I am basically adding a certain id # and location with the variable and updating it. In this case TWOS is an integer.
Here is a brief synopsis should you encounter it.
Here is the easy way to iterate some of a db with a ListArray. Notice the " These are the crucial differences from being in sql and not.
Here is the way to update something with a variable. BOTH ways work, just showing them. I am basically adding a certain id # and location with the variable and updating it. In this case TWOS is an integer.
Subscribe to:
Posts (Atom)