I am trying to bind a PHP array as argument for a SQL stmt. I am using auraSQL extended PDO so it looks like this:
$php_array = ['first', 'second', 'third'] $db->fetchColumn("SELECT * FROM my_table WHERE column IN (:php_array), ['php_array' => $php_array])"
Is there a way to do that? I cannot find out how. I tried to append the
$php_array as string separated with commas and wrapped in quotes but that doesn't work.
EDIT: Solution was to use AuraSql function
quote like so:
$db->fetchColumn("SELECT * FROM my_table WHERE column IN (".$db->quote($php_array).")";