0
Hi, it’s been a while since I’ve been searching the entire internet and trying to make this query work. In the database works, however, I need to make my application run this query, I use PDO in PHP to access the SQLITE3 database this way:
// Conexão a base de dados do coletor
$pdoColetor = new PDO('sqlite:C:\xampp\htdocs\dashboard\downloadFiles\dbcoletor.s3db') or die("Erro ao abrir a base");
// Conexão a base de dados dos 10 ultimos minutos do coletor
$pdoUltimos10 = new PDO('sqlite:C:\xampp\htdocs\dashboard\downloadFiles\coleta.ultimo') or die("Erro ao abrir a base");
So, I try to run the query for each db but do not know how to "concatenate" because they are objects...
$sqlUltimos10min = $pdoUltimos10->query('SELECT * from DEVICES');
$sqlAtualizaColetor = $pdoColetor->query('INSERT INTO devices ');
Would anyone know the correct syntax or have any idea how I can do it using PDO? In Sqlitestudio I run like this and it works:
insert into dbcoletor.devices SELECT * from coleta.devices;
Would you have any way to do that for the Sqlite PDO? I’m sorry if I made a mistake or I didn’t express my doubt correctly. Thank you for your attention...
thanks, I adapted to my code and finally got some advance...
– Adriany Magenta