[eluser]dejavu[/eluser]
Updated the select() method to better match the ActiveRecord version. ActiveRecord can accept an array or a string.
Code:
public function select($select = '*', $escape = NULL)
{
if ($escape !== FALSE) {
if (!is_array($select)) {
$select = $this->add_table_name($select);
} else {
$updated = array();
foreach ($select as $sel) {
$updated = $this->add_table_name($sel);
}
$select = $updated;
}
}
get_class_methods($this->db);
$this->db->select($select, $escape);
// For method chaining
return $this;
}
I'm not exactly clear on what add_table_name is supposed to do. So although it's working perfectly for me, I can't say if it's the correct solution. If select really has to be a string, I had a second version that basically added if(is_array($select)) $select = implode(',',$select);