A tabela "videos" não aparece criada dentro do banco
Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 1 no such table: videos in C:\Users\rafin\Documents\src\phpprojetos\aluraplay\pages\novo-video.php:6 Stack trace: #0 C:\Users\rafin\Documents\src\phpprojetos\aluraplay\pages\novo-video.php(6): PDO->prepare('INSERT INTO vid...') #1 {main} thrown in C:\Users\rafin\Documents\src\phpprojetos\aluraplay\pages\novo-video.php on line 6
pagina novo-video
<?php
$dbpath = __DIR__.'../banco.sqlite';
$pdo = new PDO("sqlite:$dbpath");
$sql = 'INSERT INTO videos (url,title) VALUES(?,?)';
$statement = $pdo -> prepare($sql);
$statement -> bindValue(1, $_POST['url']);
$statement -> bindValue(1, $_POST['title']);
var_dump($statement -> execute());
pagina criar-banco
<?php
$dbpath = __DIR__.'/banco.sqlite';
$pdo = new PDO(dsn:"sqlite:$dbpath");
$pdo -> exec(statement:'CREATE TABLE videos
(id INTEGER PRIMARY KEY, url TEXT, title TEXT);');