Log in

View Full Version : Closing the forums with a query


filburt1
12-28-2002, 03:46 PM
IIRC this alone doesn't do it:

UPDATE setting SET value = "0" WHERE varname = "bbactive"

What's the other query?

Dean C
12-28-2002, 04:07 PM
Whats IIRC?

filburt1
12-28-2002, 04:08 PM
If I recall correctly.

DrkFusion
12-28-2002, 04:46 PM
UPDATE setting SET value='0' WHERE varname='bbactive'
Try that with single quotes./

filburt1
12-28-2002, 06:26 PM
No there's some completely different query I thought.

Dean C
12-28-2002, 07:04 PM
Lmfao i thought it was a technical term...

NTLDR
12-28-2002, 07:30 PM
You need to update the options template with the values stored in the settings table for this to take effect.

vB looks at the options template and not at the setting table for all the vBulletin Options.

filburt1
12-28-2002, 07:41 PM
Ah yes. :) Remember the query?

Xenon
12-28-2002, 08:10 PM
in admin/options.php you can find this:

$optionstemplate=generateoptions();
$DB_site->query("UPDATE template SET template='$optionstemplate' WHERE title='options'");

i think the easiest way is a replace query, this one i think is the right one:

UPDATE template REPLACE(template, '$bbactive=1', '$bbactive=0') WHERE title='options'

filburt1
12-28-2002, 08:13 PM
Thanks, it looks like that'll work. :)

I don't understand why vB doesn't just read from the setting table...:confused:

Xenon
12-28-2002, 08:36 PM
hmm, i think it's faster to preparse the values into the optionstemplate instead of readem out one by one from the settingtable...

filburt1
12-28-2002, 08:36 PM
Yeah but aren't all variables in setting actually instantiated into real variables?

Xenon
12-28-2002, 09:45 PM
no, they are initialized in globa.php with this piece of code:

$optionstemp=$DB_site->query_first("SELECT template FROM template WHERE title='options'");
eval($optionstemp['template']);