PDO query help?

Hello All,

I’m trying to replace some hard coded values in an array with a PDO Query ie change this:


$form->setSelectAppointment("Appointment Type","Appointment Type","appointment_type", array ("1" => "Driving to Appointment","2" => "On Job", "3" => "In Office Working", "4" => "Out of Office Working") );

To run this query:


$form->setSelectAppointment("Appointment Type","Appointment Type","appointment_type", array ($QUERY = $dbc->query("SELECT name from photographic_users");$QUERY->setFetchMode(PDO::FETCH_COLUMN, 0);$numbers = $QUERY->fetchAll();  ) );

However it throws out a parse error?

Thanks

There should be no semicolon (:wink: in array(), and it’s defined totally wrong.