mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Profiler
* further optimize search - use achievement 4496 as shortcut for everything based around total achievement points - get talent distribution separately - get total profiler-items found separately - opt to not sort found results * fixed Profiles with zero Achievement Points * added cache key genrator i forgot :< * fixed typos
This commit is contained in:
@@ -257,12 +257,24 @@ abstract class BaseType
|
||||
|
||||
// execute query (finally)
|
||||
$mtch = 0;
|
||||
$rows = [];
|
||||
// this is purely because of multiple realms per server
|
||||
foreach ($this->dbNames as $dbIdx => $n)
|
||||
{
|
||||
$query = str_replace('DB_IDX', $dbIdx, $this->queryBase);
|
||||
|
||||
if ($rows = DB::{$n}($dbIdx)->SelectPage($mtch, $query))
|
||||
if (key($this->dbNames) === 0)
|
||||
{
|
||||
if ($rows = DB::{$n}($dbIdx)->select($query))
|
||||
{
|
||||
$mtchQry = preg_replace('/SELECT .*? FROM/', 'SELECT count(1) FROM', $this->queryBase);
|
||||
$mtch = DB::{$n}($dbIdx)->selectCell($mtchQry);
|
||||
}
|
||||
}
|
||||
else
|
||||
$rows = DB::{$n}($dbIdx)->SelectPage($mtch, $query);
|
||||
|
||||
if ($rows)
|
||||
{
|
||||
$this->matches += $mtch;
|
||||
foreach ($rows as $id => $row)
|
||||
|
||||
Reference in New Issue
Block a user