Query not writing
#4
// Reset
function random_reset() {
  global $mybb, $db;
if ($mybb->settings['random_reset'] == 1){
$db->write_query("UPDATE ".TABLE_PREFIX."settings SET value='' WHERE name='random_userbar'");
$db->write_query("UPDATE ".TABLE_PREFIX."settings SET value='1' WHERE name='random_uid'");
$db->write_query("UPDATE ".TABLE_PREFIX."settings SET value='0' WHERE name IN('random_enable', 'random_reset')");
rebuild_settings();
}
}

This should be the right code.

other removed stuff is not necesary due you have to rebuild settings file on install or activate function.

Cheers...

I do not know what do you whant to do, but without the entire code who can knows what do you wanna do, only you Smile
The only infinite thing is the universe and human stupidity, but the universe is not for sure

Plugins 1.6.x

Plugins 1.8.x

Reply


Messages In This Thread
Query not writing - by Wires - 2017-07-29, 10:11 PM
RE: Query not writing - by Whiteneo - 2017-07-30, 01:05 AM
RE: Query not writing - by Wires - 2017-07-30, 01:22 AM
RE: Query not writing - by Whiteneo - 2017-07-30, 01:30 AM
RE: Query not writing - by Wires - 2017-07-30, 02:07 AM
RE: Query not writing - by fizz - 2017-07-30, 08:12 AM
RE: Query not writing - by Wires - 2017-07-30, 10:17 AM
RE: Query not writing - by chack1172 - 2017-07-30, 10:27 AM
RE: Query not writing - by Wires - 2017-07-30, 10:31 AM
RE: Query not writing - by fizz - 2017-07-30, 11:49 AM
RE: Query not writing - by Wires - 2017-07-30, 12:03 PM
RE: Query not writing - by Whiteneo - 2017-07-30, 06:35 PM
RE: Query not writing - by Wires - 2017-07-31, 03:33 AM
RE: Query not writing - by Whiteneo - 2017-07-31, 03:50 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)