for size for size _check db prepare SELECT FROM table where and _check

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
for ($x = 0; $x < $size[0]; ++$x) {
for ($y = 0; $y < $size[1]; ++$y) {
$_check = $db -> prepare('SELECT * FROM `table` where `x` = ? and `y` = ?');
$_check -> execute([$x,$y]);
$check = $_check-> fetch();
$_items = $db -> prepare('SELECT * FROM `items` where `id` = ?');
$_items -> execute([$check['item']]);
$item_check = $_items -> fetch();
if(check($x, $y, $check['rotation'], $width, $height, $x, $y) == true) echo 'TRUE!!!!!!!!!!!!!!!!!!!!!!!!!';
imagecopyresampled($basis, $slot, $x * $dp, $y * $dp, 0, 0, $dp, $dp, $slot_width, $slot_height);
}
}