update db insert_array code