Вот код,
$orders = file(ORDERS_LOG);
$allorders = [];
foreach ($orders as $order) {
list($name, $email, $phone, $address, $orderid, $date) = explode("|", $order);
$orderinfo = [];
$orderinfo["name"] = $name;
$orderinfo["email"] = $email;
$orderinfo["phone"] = $phone;
$orderinfo["address"] = $address;
$orderinfo["orderid"] = $orderid;
$orderinfo["date"] = $date;
$sql = "SELECT title, author, pubyear, price, quantity FROM orders WHERE orderid = '$orderid' AND datetime = $date";
$result = mysqli_query($link, $sql);
$items = mysqli_fetch_all($result, MYSQLI_ASSOC);
mysqli_free_result($result);
$orderinfo["goods"] = $items;
$allorders[] = $orderinfo;
}
не могу понять почему запрос не срабатывает? Подключение к бд норм. Вылезает Couldn't fetch mysqli_result и Property access is not allowed yet in