How to use an array in query()
Notice: This thread is very old.
- netteman
- Member | 125
Hi,
I'd like to do this
$arr = array("x" => 1, "y" => 2);
$this->db->query("SELECT * FROM text WHERE id = ? OR id = ?", $arr);
but Nette says “There are more placeholders than passed parameters”.
Is it possible to use an array of values to fill the ? in the query?
Thanks :)