php - How to pass an array to postgres function and loop before updating -


i have scenario want pass array or json data of primary keys postgres function , loop through json or array data before update each record. have searched 2 days cant codes works,help please. here sample function , parameters

$this->db->query(   "select create_booking_bn_annual_maintenance($business_id,  $this->client_id, $unpaid_years, $bn_maintenance_ids)"); 

i using codeigniter framework call function , pass values

very grateful help


Comments