tests
This commit is contained in:
parent
079f865c32
commit
a5a50f6703
@ -21,8 +21,11 @@ spl_autoload_register(function ($class_name) {
|
|||||||
#echo '<hr>';
|
#echo '<hr>';
|
||||||
|
|
||||||
// Получить все...
|
// Получить все...
|
||||||
|
$items = [];
|
||||||
$res = db::c()->query('SELECT name,img,type,id FROM inventory WHERE owner = 11263 AND dressed = 1');
|
$res = db::c()->query('SELECT name,img,type,id FROM inventory WHERE owner = 11263 AND dressed = 1');
|
||||||
// Последовательно получать в виде ассоциативных массивов
|
foreach ($res->fetch_assoc() as $value) {
|
||||||
while (($data = $res->fetch_assoc()) !== null) {
|
$items[$value['id']] = $value;
|
||||||
print_r($data);
|
|
||||||
}
|
}
|
||||||
|
print_r($items);
|
||||||
|
|
||||||
|
# $items = []; foreach(фетч того ебучего массива as $value) {$items[$value['id']] = $value}
|
Loading…
x
Reference in New Issue
Block a user