I am trying to store two results in two variables but I can not get it to work:
$sql->query('SELECT * FROM table1; SELECT * from table2;');
$first = $sql->getAllData();
$second = $sql->nextRowset()->getAllData();
How should I use this instead?
edit: function:
public function getAllData()
{
$this->execute();
return $this->stmt->fetchAll(PDO::FETCH_ASSOC);
}