• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.