In memory data refactor, less queries, cube/unique doc backend working fast

This commit is contained in:
color.diff=auto
2021-05-12 19:00:56 -06:00
parent ca04aa615f
commit 5eced413cb
7 changed files with 15188 additions and 133 deletions

View File

@@ -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