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

[eluser]Unknown[/eluser]
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.
Code:
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.


Messages In This Thread
Passing array of fields to select - by El Forum - 08-08-2011, 02:58 PM



Theme © iAndrew 2016 - Forum software by © MyBB