lexington
09-27-2007, 07:12 PM
I guess after the nonstop coding my brain has given up on me since I cannot figure this out. Could anyone provide me with an example that selects every row from a mysql DB table, and checks to see if each result is equal to 1? I am trying to add an error check to see if every row table named im_ready is equal to 1 and if not then it will stop the script. I cannot figure out a way to write this since a simple select query will not do the trick. Is there were foreach comes in or something? If you could please provide me with a code example that selects into from a DB and checks each individual value for each row and if one is not equal to 1 it errors but if all equal 1 it goes. I did use a SELECT count that compares the total rows to the rows that are ready and if they are equal it does what I want but the code looks messy and I am sure there is a better and cleaner way. Thanks.
