Fatal error: Uncaught Krugozor\Database\Mysql\Exception: Krugozor\Database\Mysql\Mysql::query: Unknown column 'dressed' in 'where clause'

This commit is contained in:
Igor Barkov (iwork) 2020-07-21 10:42:42 +03:00
parent 46e559d7d3
commit 87bcfe5b30

View File

@ -963,22 +963,22 @@ if (input::get('edit')) {
</tr>
<?php endif;
if ($_SESSION['razdel'] == null) {
$data_query = 'SELECT * FROM inventory WHERE owner_id = ?i AND dressed = 0 AND ( type < 12 OR type = 22 OR type = 23 OR type = 24 ) AND setsale = 0';
$data_query = 'SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot = 0 AND ( type < 12 OR type = 22 OR type = 23 OR type = 24 ) AND setsale = 0';
}
if ($_SESSION['razdel'] == 1) {
$data_query = 'SELECT * FROM inventory WHERE owner_id = ?i AND dressed = 0 AND type = 12 AND setsale = 0';
$data_query = 'SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot = 0 AND type = 12 AND setsale = 0';
}
if ($_SESSION['razdel'] == 2) {
$data_query = 'SELECT * FROM inventory WHERE owner_id = ?i AND dressed = 0 AND (type > 12 OR type != 22 OR type != 23 OR type != 24) AND setsale = 0';
$data_query = 'SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot = 0 AND (type > 12 OR type != 22 OR type != 23 OR type != 24) AND setsale = 0';
}
if ($_SESSION['razdel'] == 3) {
$data_query = 'SELECT * FROM inventory WHERE owner_id = ?i AND dressed = 0 AND type >= 80 AND type <= 89 AND setsale = 0';
$data_query = 'SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot = 0 AND type >= 80 AND type <= 89 AND setsale = 0';
}
if ($_SESSION['razdel'] == 4) {
$data_query = 'SELECT * FROM inventory WHERE owner_id = ?i AND dressed = 0 AND type = 200 AND setsale = 0';
$data_query = 'SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot = 0 AND type = 200 AND setsale = 0';
}
if ($_SESSION['razdel'] == 5) {
$data_query = 'SELECT * FROM inventory WHERE owner_id = ?i AND dressed = 0 AND type = 199 AND setsale = 0';
$data_query = 'SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot = 0 AND type = 199 AND setsale = 0';
}
$data = db::c()->query($data_query, $_SESSION['uid']);