mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2025-10-13 08:24:24 -05:00
In memory data refactor, less queries, cube/unique doc backend working fast
This commit is contained in:
@@ -134,8 +134,8 @@ WHERE `type` IS NOT NULL AND uniqueitems.`code`= $table.`code` AND $table.`code`
|
||||
*/
|
||||
if ($cmd == 'search') {
|
||||
$search = $_GET['search'];
|
||||
$sql = "SELECT * FROM uniqueitems WHERE `index` LIKE '%$search%' OR `code` LIKE '%$search%' AND `enabled`=1 ORDER BY `index`";
|
||||
$res = PDO_FetchAll($sql);
|
||||
$sql = "SELECT * FROM uniqueitems WHERE `index` LIKE '%?%' OR code LIKE '%?%' AND enabled=1 ORDER BY `index`";
|
||||
$res = PDO_FetchAll($sql,[$search, $search]);
|
||||
$html = '';
|
||||
foreach ($res as $r) {
|
||||
if ($sort == 'index') {
|
||||
@@ -160,10 +160,10 @@ if ($cmd == 'getString') {
|
||||
|
||||
$prop = $_GET['prop'];
|
||||
|
||||
$sql = "SELECT stat1,stat2,stat3,stat4,stat5,stat6,stat7 FROM `properties` WHERE `code` = '$prop'";
|
||||
$stat = array_filter(PDO_FetchRow($sql));
|
||||
$sql = "SELECT stat1,stat2,stat3,stat4,stat5,stat6,stat7 FROM properties WHERE code = ?";
|
||||
$stat = array_filter(PDO_FetchRow($sql, [$prop]));
|
||||
|
||||
$s = array_filter($idata->getIscStrings($stat['stat1']));
|
||||
$s = array_filter($idata->getIscStrings($prop));
|
||||
|
||||
// now combine isc strings with par, min, max
|
||||
|
||||
|
Reference in New Issue
Block a user