tests
This commit is contained in:
parent
079f865c32
commit
a5a50f6703
@ -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}
|
Loading…
Reference in New Issue
Block a user