Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 07 Apr 2011, 06:08
Twilkey's Avatar
Twilkey Twilkey is offline
 
Join Date: Oct 2006
Dang While Loop

I am trying to make a list from my database and so to do that I am using a while loop. The problem I am having is that when the code hits while() it seems to crap out and not do anything. Then it passes the loop and goes on its way.

Now, everything outside the loop from what I have seen works just fine, and I even pulled out the template render code and just displayed it and that worked.
The only line I could figure has a problem is
while ($downloads_users = $vbulletin->db->fetch_array($downloads_user_query))
And I don't see any issue in that line. I even use that while loop in another file, just slightly edited.

I did a vardump() on $downloads_user_query and returned array(2) { ["userid"]=> string(4) "6934" ["username"]=> string(7) "Twilkey" } so i know my function works, but just to be sure, I went ahead and worked the query directly in the code below and the wile loop still didn't work.

I even got rid of all code but the query and the while loop and still got nothing. I tried to echo $downloadsusername from within the loop and that was blank.

So what is wrong here?


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #2  
Old 07 Apr 2011, 06:41
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
What is the getUsers function?
Reply With Quote
  #3  
Old 07 Apr 2011, 07:08
Twilkey's Avatar
Twilkey Twilkey is offline
 
Join Date: Oct 2006

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #4  
Old 07 Apr 2011, 07:51
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
You need to change:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


to


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


don't you?
Reply With Quote
  #5  
Old 07 Apr 2011, 15:25
Twilkey's Avatar
Twilkey Twilkey is offline
 
Join Date: Oct 2006
I tried that and then the query didn't return anything.

--------------- Added 08 Apr 2011 at 14:14 ---------------

Noone seeing something I am not?

Last edited by Twilkey; 08 Apr 2011 at 14:14. Reason: Auto-Merged DoublePost
Reply With Quote
  #6  
Old 09 Apr 2011, 18:15
Twilkey's Avatar
Twilkey Twilkey is offline
 
Join Date: Oct 2006
Noone?
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 06:07.

Layout Options | Width: Wide Color: