MySQL Forums
Forum List  »  Newbie

looping through queries
Posted by: Jordan Pritt
Date: July 18, 2017 09:42AM

I have a query that generates 2 - 10 rows of results. What I want to do is check each row for X and then either show that result or query a different row in its place. I'm sure there has to be a way to loop though the rows while querying them, but I'm still new to MySQL. Any thoughts would appreciated!

Example of desired result:
row 1: a (check was true)
row 2: b (check was true)
row 3: c (check was false) change c to e
row 4: d (check was true)

Options: ReplyQuote


Subject
Written By
Posted
looping through queries
July 18, 2017 09:42AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.