This commit is contained in:
lopar 2018-03-31 16:58:36 +03:00
parent 079f865c32
commit a5a50f6703
1 changed files with 6 additions and 3 deletions

View File

@ -21,8 +21,11 @@ spl_autoload_register(function ($class_name) {
#echo '<hr>';
// Получить все...
$items = [];
$res = db::c()->query('SELECT name,img,type,id FROM inventory WHERE owner = 11263 AND dressed = 1');
// Последовательно получать в виде ассоциативных массивов
while (($data = $res->fetch_assoc()) !== null) {
print_r($data);
foreach ($res->fetch_assoc() as $value) {
$items[$value['id']] = $value;
}
print_r($items);
# $items = []; foreach(фетч того ебучего массива as $value) {$items[$value['id']] = $value}