Код: Выделить всё
$query = "SELECT * from `items` where category_id=?";
$stmt = $mysqli->query($query);
$stmt->bind_param("s", $category_id);
$stmt->execute();
$result = $stmt->get_result();
while ($row = $stmt->fetch_assoc()) {
printf ("%s (%s)\n", $row['name'], $row['code']);
}
Подробнее здесь: https://stackoverflow.com/questions/906 ... ble-in-php
Мобильная версия