How to put multiple fields in an index operation on a GET HTTP request with services? I'm working with the module "services" everything's ok with a get request, note that i've create my own custom resource with CRUD operations, the "retrieve","update" are ok but the problem is with the index operation. With only one field it works and show all records with the default field I declared on resource. Now how to put an array of $fields ?

This is the resource declaration (the "fields" part of the code) :

array(
        'name' =&gt; 'fields',
        'optional' =&gt; TRUE,
        'type' =&gt; 'string',
        'description' =&gt; 'The fields to get.',
        'default value' =&gt; 'field_title_value',
        'source' =&gt; array('param' =&gt; 'fields'),
      ),


now here is the function index (callback) :

function _my_module_livre_index($page, $fields, $parameters, $page_size){

$query = db_select('field_data_field_title','t');

services_resource_build_index_query($query, $page, $fields, $parameters, $page_size, 'Livre');
$result = services_resource_execute_index_query($query);

$bien = services_resource_build_index_list($result, 'livre', 'field_title_value');
return array('code'=&gt;'0', 'response'=&gt;$bien);   
}


The doc of services said that $fields is an array of fields i want to return, when i make : 
$fields = array('field 1','field 2','field 3');
It return an error. If I make a "classic" :

$query = db_select('my table')
-&gt;fields('my table', array('field 1','field 2','field 3')


Same error.

Any help please ?

Thank you all.
The simple db_select with fields make it work easy as that :

function _my_module_livre_index($page, $fields, $parameters, $page_size){

$query = db_select('field_data_field_title','t')
-&gt;fields('t', array('field_title_value','entity_id','delta'));//&lt;+++++ whatever you want

services_resource_build_index_query($query, $page, $fields, $parameters, $page_size, 'Livre');
$result = services_resource_execute_index_query($query);

$bien = services_resource_build_index_list($result, 'livre', 'field_title_value');
return array('code'=&gt;'0', 'response'=&gt;$bien);
}