The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Need help breaking out of while() loop - logic problem...
I have the following result set from my db:
------------------------------- | postid | post_statusid | ------------------------------- | 100 | 4 | | 101 | 7 | ------------------------------- And I am looping through the result set as follows: PHP Code:
If any posts have post_statusid of '7' set $statusid = 7 If any posts have post_statusid of '4' and NO posts have post_statusid of '7' set $statusid = 4 If no posts have post_statusid of '7' or of '4' set $statusid = 8 The result set can only have a value of 4,7, or 8. Following are all possible result sets, however the one highlighted in red is giving me a problem. It's returning '4' instead of the needed value of '7': If: 8,8 $statusid = 8 If: 8,7 $statusid = 7 If: 8,4 $statusid = 4 If: 7,8 $statusid = 7 If: 7,7 $statusid = 7 If: 7,4 $statusid = 7 If: 4,8 $statusid = 4 If: 4,7 $statusid = 7 If: 4,4 $statusid = 4 Anyone have an idea on how to get this one instance of 4,7 to return '7' as I need instead of '4'? Thanks in advance |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|