
-----------------------------------
compstudent
Sun Apr 10, 2011 3:01 pm

Looping through MySQL rows
-----------------------------------
Hi,

I have table where there are 4 columns like seen below. 
_____________________________________

Option 1 || Option 2 || Option 3 || Id ||

name--------------------------------3
--------------name------------------6
name---------------------------------8
---------------------------name------9
____________________________________

When I enter the results (which option is correct later) I want to go through all the names in that column and retrieve it, put the query to the users table, then add points to them in the users table. The Id's won't be in order, since some will be deleted then new ones added. I am not sure how to go through and find all the names in a particular column.  

Thanks

Matthew

-----------------------------------
DemonWasp
Sun Apr 10, 2011 5:31 pm

RE:Looping through MySQL rows
-----------------------------------
SELECT [Id],[Option 3] FROM [table] WHERE [Option 3] NOT NULL;

-----------------------------------
compstudent
Mon Apr 11, 2011 8:42 pm

Re: Looping through MySQL rows
-----------------------------------
Thanks, Figured it out, needed to also set values in table to null.
