UPDATE `users` SET `invites` = '2' WHERE `invites` = `0`; $keywords = $_GET['keywords'];
if (!$keywords == '') {
$keys = explode(" ", $keywords);
foreach ($keys as $k) {
$searcha[] = " forum_topics.subject LIKE '%$k%' ";
$searchb[] = " forum_posts.body LIKE '%$k%' ";
$searchc[] = " forum_topics.subject LIKE '%$k%' ";
$searchd[] = " forum_posts.body LIKE '%$k%' ";
}
$whereasearch = '(' . implode(' OR ', $searcha) . ')';
$wherebsearch = '(' . implode(' OR ', $searchb) . ')';
$wherecsearch = implode(' OR ', $searchc);
$wheredsearch = implode(' OR ', $searchd);
$wherea = $whereasearch;
$whereb = $wherebsearch;
$wherec = $wherecsearch;
$whered = $wheredsearch;
}
$test = DB::run("SELECT *, ( $wherea + $whereb ) as count_words
FROM forum_posts
JOIN forum_topics
ON forum_posts.topicid=forum_topics.id
WHERE ($wherec OR $whered)
ORDER BY count_words DESC")->fetchAll();
/*
var_dump($wherea); echo '<br>';
var_dump($whereb); echo '<br>';
var_dump($wherec); echo '<br>';
var_dump($whered); echo '<br>';
*/
foreach ($test as $row) {
var_dump($row); echo '<br>';
}
die();
public function optimize()
{
// OPTIMIZE TABLES
$res = DB::run("SHOW TABLES");
while ($table = $res->fetch(PDO::FETCH_LAZY)) {
// Get rid of overhead.
DB::run("REPAIR TABLE `$table[0]`;");
// Analyze table for faster indexing.
DB::run("ANALYZE TABLE `$table[0]`;");
// Optimize table to minimize thrashing.
DB::run("OPTIMIZE TABLE `$table[0]`;");
}
}
<div class="card-header text-center frame-header">Propaganda:Clicking on your own username in the shoutbox, does not work....is profile 0
`times_completed` = WHERE `times_completed` = 0 WHERE $action = strip_tags($_REQUEST["action"]);if (array_key_exists('action', $_REQUEST)) {
$action = strip_tags($_REQUEST["action"]);
}if (array_key_exists('action', $_REQUEST)) {
$action = strip_tags($_REQUEST["action"]);
} else {
// no array so empty string
$action = '';
}$stylesheets // for number value
$stylesheets ?? 0;
// for string value
$stylesheets ?? '' $oldpassword = md5($_POST["password"]);
if ($sql['password'] == $oldpassword) {
$passhash = password_hash($_POST["password"], PASSWORD_BCRYPT);
DB::run("UPDATE users SET password=? WHERE id=?", [$passhash, $sql['id']]);
Redirect::autolink(URLROOT . "/logout", Lang::T("Password _Hash_Updated"));
} 
