Добрый ночи/утра)
Не могу решить данные ошибки в php.
Ошибки.
PHP Notice: Undefined variable: sql in /home/bdgeo/web/bdgeobot.ml/public_html/bdgeobot.php on line 68
PHP Warning: mysqli::query(): Empty query in /home/bdgeo/web/bdgeobot.ml/public_html/bdgeobot.php on line 68
PHP Notice: Trying to get property of non-object in /home/bdgeo/web/bdgeobot.ml/public_html/bdgeobot.php on line 69
Код.
$type = 'start';
68 строка $result = $conn->query($sql);
69 строка if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
$sql = "DELETE FROM message_queue WHERE id=" . $row["mid"];
$result = $conn->query($sql);
}
}
$mes = '/start';
$sql = "INSERT INTO message_queue VALUES(NULL," . $chat_id . ",'" . $mes . "')";
$result = $conn->query($sql);
sendMessage($chat_id, $w_text, $type, $emoji);
break;