View Full Version : dovars()
filburt1
12-24-2002, 12:51 AM
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:
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
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 :)
confusion is always good, that's the fun we have on working with vb
How correct!
Mystis
12-26-2002, 08:34 PM
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
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:
Dean C
12-29-2002, 11:53 AM
Ahhh the curse of the two ultimate vb hackers :p
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.