vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Empty datas to display in a template ? (https://vborg.vbsupport.ru/showthread.php?t=53904)

grog6 06-05-2003 09:53 PM

Empty datas to display in a template ?
 
1 Attachment(s)
Well, I'm trying to do this modification of my hack :

https://vborg.vbsupport.ru/showthrea...394#post404394

But that's what I get on my forum :(
I use this code :

PHP Code:

$classes=$DB_site->query("SELECT * FROM usertitleclass ORDER BY displayorder");
 while (
$classe=$DB_site->fetch_array($classes)) {


        
$titles=$DB_site->query("SELECT * FROM usertitle WHERE usertitleclass='$classe[usertitleclassid]' ORDER BY minposts");
         while (
$title=$DB_site->fetch_array($titles)) {

          if (
$j == 1$color2 "#1C5780";
           else 
$color2 "#13486D";

          eval(
"\$liste .= \"".gettemplate('usertitles_liste')."\";");
          
$j $j 1;
          if (
$j == 2$j=0;
                                                       }

   eval(
"\$clas .= \"".gettemplate('usertitles_class')."\";");
                                                 } 

Why does it display all previous datas from the usertitle's table whereas only those who has the same userstylecass equal to the userstyleclassid of my userclass' table would be shown :confused:

I've tried using a free_result without success .....

Any idea ?

grog6 06-05-2003 09:54 PM

1 Attachment(s)
Here is the content of my usertitle's table

grog6 06-05-2003 09:56 PM

And here is the content of my userclass' table :angry:

I'd like to understand at least why it show me all previous datas from the usertitle's table :tired:

Thx

Xenon 06-06-2003 09:37 AM

because:
PHP Code:

eval("\$liste .= \"".gettemplate('usertitles_liste')."\";"); 

$liste is never been set to '' for the next class...

add before $titles=$DB....
$liste = '';

:)

grog6 06-06-2003 10:35 AM

Thx Xenon, I try it :)

grog6 06-06-2003 10:51 AM

It works perfect !
Thx Xenon :)

Xenon 06-06-2003 10:59 AM

you're welcome


All times are GMT. The time now is 01:45 PM.

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.02373 seconds
  • Memory Usage 1,730KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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