In memory images/invfiles, general sql cleanup

This commit is contained in:
color.diff=auto
2021-05-12 22:31:41 -06:00
parent 5eced413cb
commit 016ea0e5d2
6 changed files with 3418 additions and 536 deletions

View File

@@ -71,8 +71,8 @@ if ($cmd == "getUniqueItem") {
*
* */
if ($cmd == "sortBy") {
$sql = "SELECT `index`,`$sort` FROM `uniqueitems` WHERE `enabled`='1' ORDER BY `$sort`";
$res = PDO_FetchAll($sql);
$sql = "SELECT `index`, ? FROM uniqueitems WHERE enabled='1' ORDER BY ?";
$res = PDO_FetchAll($sql, [$sort]);
$html = '';
foreach ($res as $r) {
@@ -160,7 +160,9 @@ if ($cmd == 'getString') {
$prop = $_GET['prop'];
$sql = "SELECT stat1,stat2,stat3,stat4,stat5,stat6,stat7 FROM properties WHERE code = ?";
// stat2,stat3,stat4,stat5,stat6,stat7
$sql = "SELECT stat1 FROM properties WHERE code = ?";
$stat = array_filter(PDO_FetchRow($sql, [$prop]));
$s = array_filter($idata->getIscStrings($prop));