vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Display a list (https://vborg.vbsupport.ru/showthread.php?t=63732)

krohnathlonman 04-10-2004 08:21 PM

Display a list
 
I want to display a list inside of a PHP page.

Here's my Query, I just want display the list.....
PHP Code:

      <?php
 
 $guide 
=    $DB_site->query("SELECT id, subject, subject_2 FROM amartin WHERE category  = 'guide' ORDER BY subject ASC");
 
     
     while (list (
$id$subject$topic) = mysql_fetch_row($guide)) {
    echo 
"<tr><td width=50%><a href=articles.php?aid=$id&page=1&topic=$topic>$subject</a></td></tr>\n";
 
 }
 
?>

Whats the proper way of doing this in VBulletin?

krohnathlonman 04-10-2004 09:21 PM

Here's what I've got so far:

PHP Code:

 $pop =    $DB_site->query("SELECT id, subject FROM amartin ORDER BY views DESC LIMIT 5");
      while(
$popular $DB_site->fetch_array($pop)) {
  
            
$populars['subject'] = $popular['subject'];
              
$populars['id'] = $popular['id'];
      }
  eval(
"\$popularbit .= \"".fetch_template('article_list_bit')."\";");
  
  eval(
"\$article[popular] = \"".fetch_template('article_pop')."\";");
      unset(
$popular);
      
$DB_site->free_result($pop); 

What else Do I need for it to display the list? I only get the very last item of the list..... It's just not looping right :( what I miss?

krohnathlonman 04-12-2004 08:10 PM

anybody?

NTLDR 04-12-2004 08:35 PM

PHP Code:

eval("\$popularbit .= \"".fetch_template('article_list_bit')."\";"); 

The above line should be within the while loop :)


All times are GMT. The time now is 11:10 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.01351 seconds
  • Memory Usage 1,721KB
  • 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
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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