select name, pretty_name, datatype, required_p, widget, options from pb_attributes where type_id = :type_id order by attribute_id select name from pb_attributes where type_id = :type_id order by attribute_id