This commit is contained in:
Igor Barkov [iwork] 2019-01-11 18:20:07 +02:00
parent 730c016367
commit fbc588981b
2 changed files with 25 additions and 40 deletions

View File

@ -1,40 +0,0 @@
<?php
include '../config.php';
spl_autoload_register(function ($class_name) {
include '../classes/' . $class_name . '.php';
});
//include_once '../classes/n.php';
//include_once '../classes/nick.php';
//include '../functions.php';
//showinf_pers(10736,1);
//showinf_pers(10736);
#$row = db::c()->query('select * from `bank` WHERE owner=10929 OR owner=11221')->fetch_assoc_array();
#print_r($row);
#echo '<hr>';
#$row2 = db::c()->query('select * from `bank` WHERE owner=10929 OR owner=11221')->fetch_row_array();
#print_r($row2);
#echo '<hr>';
// Получить все...
$items = [];
$res = db::c()->query('SELECT name,img,type,id FROM inventory WHERE owner = 11263 AND dressed = 1');
foreach ($res->fetch_assoc() as $value) {
$items[$value[0]] = $value;
}
print_r($items);
# $items = []; foreach(фетч того ебучего массива as $value) {$items[$value['id']] = $value}
$result = db::c()->query('SELECT * FROM `shop` WHERE count > 0');
while ($row = $result->fetch_assoc()) {
$iteminfo[] = new ItemStats($row);
}
foreach ($iteminfo as $iinfo) {
$iinfo->printItemStats();
}

25
test.php Normal file
View File

@ -0,0 +1,25 @@
<?php
require_once 'config.php';
//include '../functions.php';
//showinf_pers(10736,1);
//showinf_pers(10736);
//// Получить все...
//$items = [];
//$res = db::c()->query('SELECT name,img,type,id FROM inventory WHERE owner = 11263 AND dressed = 1');
//foreach ($res->fetch_assoc() as $value) {
// $items[$value[0]] = $value;
//}
//print_r($items);
# $items = []; foreach(фетч того ебучего массива as $value) {$items[$value['id']] = $value}
$result = db::c()->query('SELECT * FROM `shop` WHERE count > 0');
while ($row = $result->fetch_assoc()) {
$iteminfo[] = new ItemStats($row);
}
foreach ($iteminfo as $iinfo) {
$iinfo->printItemStats();
}