vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   help with loops (https://vborg.vbsupport.ru/showthread.php?t=37133)

Neo 04-07-2002 07:37 PM

help with loops
 
OK i have a few large looks that call data *duh* but what I have the problem doing id getting it into a template.. do you know if this is possiable?

Gimp 04-08-2002 07:25 AM

uhh?
rephrase

Logician 04-08-2002 07:56 AM

I didnt get the question either.

Neo 04-12-2002 10:23 PM

Errr... What I mean to say *not being drunk* Is how would I take information for loops. That calls data from a database and prints it to the screen. I would leik to be able to take that data and put it in a template but every time I try I always get the last piece of data it calls.. example:

Bill
Bob
John
Sam

with would be the output of the loop from each row it finds.. but how would I get the it to show all of them in a template?

Logician 04-16-2002 10:52 AM

when you get the data from db, append it to a variable. eg.

($count stands for the number of data you got from db., $retrieved_from_db is an array that keeps the retrieved data)

for ($i=0;$i<$count; $i++)
{
$compiling_data.=$retrieved_from_db[$i];
}

When this loop ends, you will have all the retrieved data in your variable "$compiling_data". Now you can use this in your template..

Neo 04-17-2002 05:06 AM

Yeah I got it.. I was being dumb and I used the sprintf to help me along with things


All times are GMT. The time now is 12:35 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00936 seconds
  • Memory Usage 1,708KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete