pioneerx01 Posted June 7, 2011 Share Posted June 7, 2011 I am not sure if the subject line is absolutely accurate in regards to what I want to do, but here is what I am trying to accomplish: In my table I have record (call it ID=1) with few column names of 'pictures' and 'exclude' amongst others. In this example value of pictures is '5' If I call on ID 1, I want to echo out 5 rows each with different number, so the result is: this is picture 1 this is picture 2 this is picture 3 this is picture 4 this is picture 5 Now if the 'exclude' has values of lets say '3, 4', I want to echo out all the 5 rows, but the ones that should have 3 and 4. So, the result should be: this is picture 1 this is picture 2 this is picture 5 How do I do that? Thank you Quote Link to comment https://forums.phpfreaks.com/topic/238609-while-loop-with-limits-and-exceptions/ Share on other sites More sharing options...
btherl Posted June 7, 2011 Share Posted June 7, 2011 Can you please post the code you have now? Quote Link to comment https://forums.phpfreaks.com/topic/238609-while-loop-with-limits-and-exceptions/#findComment-1226211 Share on other sites More sharing options...
pioneerx01 Posted June 7, 2011 Author Share Posted June 7, 2011 Well, I do not have any. I can run the query, but that is about it. I have no idea how to display data as I want to. Quote Link to comment https://forums.phpfreaks.com/topic/238609-while-loop-with-limits-and-exceptions/#findComment-1226220 Share on other sites More sharing options...
btherl Posted June 7, 2011 Share Posted June 7, 2011 By "Run the query" do you mean you can run it in PHP and display the results, or you can run it in an administration program like phpmyadmin? Quote Link to comment https://forums.phpfreaks.com/topic/238609-while-loop-with-limits-and-exceptions/#findComment-1226278 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.