Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Looping through MySQL rows
Index -> Programming, PHP -> PHP Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
compstudent




PostPosted: Sun Apr 10, 2011 3:01 pm   Post subject: 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
Sponsor
Sponsor
Sponsor
sponsor
DemonWasp




PostPosted: Sun Apr 10, 2011 5:31 pm   Post subject: RE:Looping through MySQL rows

SELECT [Id],[Option 3] FROM [table] WHERE [Option 3] NOT NULL;
compstudent




PostPosted: Mon Apr 11, 2011 8:42 pm   Post subject: Re: Looping through MySQL rows

Thanks, Figured it out, needed to also set values in table to null.
Display posts from previous:   
   Index -> Programming, PHP -> PHP Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: