Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 11 Mar 2011, 12:28
Twilkey's Avatar
Twilkey Twilkey is offline
 
Join Date: Oct 2006
Query ends after 1 loop

What about this code could cause only one row to be displayed?

I have tried this with $blogs = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "blog");
and there are over 1000 entries to display, so I am pretty sure the query is fine. I tried deleting the avatar code just to see if it helped, but when I go to save the plugin, I get a 301 error. So i can not even get rid of that code to test.


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


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


Last edited by Twilkey; 11 Mar 2011 at 12:34.
Reply With Quote
  #2  
Old 11 Mar 2011, 13:32
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
LIMIT 0, 3 is only going to give you the first 3 results from the database. And the end } should be after the while loop (before //Avatar Display), shouldn't it?
Reply With Quote
  #3  
Old 11 Mar 2011, 14:01
Twilkey's Avatar
Twilkey Twilkey is offline
 
Join Date: Oct 2006
3 results is what I wanted, and as for the last }. Doing that would just cause the whole thing to stop working.

Either way, I figured out the problem. I used $blog_bits to create the template and register the variables, then I also used the same to store the render of the template. You can not do that. So I simply made
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

It was a simple mistake on my part.

Thanks for your input though Boofo.
Reply With Quote
  #4  
Old 11 Mar 2011, 14:21
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Glad you got it. I still don't see why you need the Avatar Display and the template render in the while loop. But that doesn't matter now that you have it working.
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 19:49.

Layout Options | Width: Wide Color: