Код
<?
error_reporting(E_ALL);
ini_set('display_startup_errors', 1);
ini_set('display_errors', '1');
if(!isset($_SESSION['login_id'])){
echo "Вы на авторизированы";
exit();
}
$id = $_SESSION['login_id'];
require_once '../boot.php';
$name = $_GET["name"];
$stmt = pdo()->prepare("INSERT INTO `chats` (`id`, `name`, `owner-id`, `users-id`, `admins-id`) VALUES (NULL, :name, :owner-id, :users-id, :admins-id)");
$stmt->execute([
'name' => $name,
'owner-id' => $id,
'users-id' => $id,
'admins-id' => $id,
]);
Выдаёт ошибку
Fatal error: Uncaught PDOException: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined in /home/z/z92616gy/z92616gy.beget.tech/public_html/chat/do_create_chat.php:17 Stack trace: #0 /home/z/z92616gy/z92616gy.beget.tech/public_html/chat/do_create_chat.php(17): PDOStatement->execute(Array) #1 {main} thrown in /home/z/z92616gy/z92616gy.beget.tech/public_html/chat/do_create_chat.php on line 17
В чём дело?