Inserting results from previous query not possible
prkwcz opened this issue · 0 comments
prkwcz commented
I have a script that collects data from different sources and imports it into a MariaDB database.
Practically it looks like this:
// Getting all the necessary import sets
$db1Result = $db1->fetchAll("SELECT A, B, C FROM XYZ");
//Importing to the new database
$db2->query("INSERT INTO ZYX", $db1Result);
But then I always get the following error message:
Automaticaly detected multi-insert, but values aren't array. If you need try to change mode like "?[and|or|set|values|order]". Mode "values" was used.
In fact, this seems to be a bug in version 3. Here it seems that no ResultSet is accepted as input for the insert anymore.