I want to copy table from another db file but I fail and I can't get why. This is my code:
$db = new SQLite3($_SERVER['DOCUMENT_ROOT']."/db/098765.db");
$sql = "ATTACH DATABASE 'admin.db' AS admin ;
INSERT INTO 'table-1' SELECT * FROM 'admin.table-1';";
$db->query($sql);
I've read all the questions on this topic on this site, but no answer helped me.
Giving the full path to ATTACH DATABASE doesn't work. Creating table before inserting data also doesn't work.
php?