Welcome Guest, Not a member yet? Register   Sign In
Passing array of fields to select

In documentation it is told that you can pass only string to ActiveRecord's select method, but looking at code, I see, that it is possible to pass array too. Actually it gets converted to array if it is comma-separated string.
if (is_string($select))
    $select = explode(',', $select);
So the question is: is it OK if I pass array to select (will it work in next versions of CodeIgniter)? Or maybe you could add this to documentation?

The reason why I need to pass array (not string) of fields is because the list is generated dynamically and it is easier to manipulate arrays than comma-separated strings.

Theme © iAndrew 2016 - Forum software by © MyBB