vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   dovars() (https://vborg.vbsupport.ru/showthread.php?t=46951)

filburt1 12-24-2002 12:51 AM

dovars()
 
Does calling dovars() repeatedly generate queries for each call, or only a query for the first one?

Logician 12-24-2002 08:17 AM

I guess only a query for the first call

filburt1 12-24-2002 02:37 PM

Good :)

Xenon 12-24-2002 02:40 PM

you could have seen that yourself:
PHP Code:

 global $DB_site,$replacementsetid,$gzipoutput,$gziplevel,$newpmmsg,$microstats;
  static 
$vars;

  if (
connection_status()) {
    exit;
  }

  if (!isset(
$vars)) {
    
$vars=$DB_site->query("SELECT findword,replaceword FROM replacement WHERE replacementsetid IN(-1,'$replacementsetid') ORDER BY replacementsetid DESC,replacementid DESC");
  } else {
    
$DB_site->data_seek(0,$vars);
  } 


$vars is declared static :)

filburt1 12-24-2002 02:43 PM

I know but I'm never sure on how vB's cache systems work :)

Xenon 12-24-2002 02:47 PM

*ggg*
confusion is always good, that's the fun we have on working with vb ;)

Logician 12-25-2002 08:54 AM

Quote:

Originally posted by Xenon
you could have seen that yourself:
hehe actually the question lies whether "$DB_site->data_seek(0,$vars);" part generates a query.. Its roots goes into deep inside db_mysql.php :)

Quote:

confusion is always good, that's the fun we have on working with vb
How correct!

Mystis 12-26-2002 08:34 PM

Quote:

Originally posted by Xenon
*ggg*
confusion is always good, that's the fun we have on working with vb ;)

There's so much truth in that statement that my head hurts.

Xenon 12-28-2002 09:29 PM

i think you are right friend logician, but from a logical point of view, why should the use a static var, if it would always produce a query ;)

@Mystis: thanx ;)

Logician 12-29-2002 07:35 AM

Quote:

Originally posted by Xenon
i think you are right friend logician, but from a logical point of view, why should the use a static var, if it would always produce a query ;)

you have a point pal :glasses:


All times are GMT. The time now is 10: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.01080 seconds
  • Memory Usage 1,736KB
  • 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)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete