Re: Any idea how re-index results?

2009-06-21 Thread Martin Westin
find('list') with multiple fields defined should also work, I think.


On Jun 21, 11:50 am, "Dr. Loboto"  wrote:
> $data = array ('Fuelprice' => Set::combine($data, 'Fuelprice.{n}.id',
> 'Fuelprice.{n}'));
>
> On Jun 21, 12:18 am, Petr Vytlačil  wrote:
>
>
>
> > Hi, does anybody idea how reindexing results?
>
> > Now output from CakePHP:
> > 
>
> > [Fuelprice] => Array
> >         (
> >             [0] => Array
> >                 (
> >                     [id] => 1
> >                     [yearsetting_id] => 2
> >                     [fueltype_id] => 1
> >                     [price] => 26.3
> >                 )
>
> >             [1] => Array
> >                 (
> >                     [id] => 2
> >                     [yearsetting_id] => 2
> >                     [fueltype_id] => 2
> >                     [price] => 26.3
> >                 )
>
> >             [2] => Array
> >                 (
> >                     [id] => 3
> >                     [yearsetting_id] => 2
> >                     [fueltype_id] => 4
> >                     [price] => 26.8
> >                 )
>
> >         )
>
> > I wish:
> > -
> > [Fuelprice] => Array
> >         (
> >             [id_item] => Array
> >                 (
> >                     [id] => 1
> >                     [yearsetting_id] => 2
> >                     [fueltype_id] => 1
> >                     [price] => 26.3
> >                 )
>
> > 
> > Example:
> > -
> > [Fuelprice] => Array
> >         (
> >             [1] => Array
> >                 (
> >                     [id] => 1
> >                     [yearsetting_id] => 2
> >                     [fueltype_id] => 1
> >                     [price] => 26.3
> >                 )
>
> >             [2] => Array
> >                 (
> >                     [id] => 2
> >                     [yearsetting_id] => 2
> >                     [fueltype_id] => 2
> >                     [price] => 26.3
> >                 )
>
> >             [3] => Array
> >                 (
> >                     [id] => 3
> >                     [yearsetting_id] => 2
> >                     [fueltype_id] => 4
> >                     [price] => 26.8
> >                 )
>
> >         )
>
> > THX.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Any idea how re-index results?

2009-06-21 Thread Dr. Loboto
$data = array ('Fuelprice' => Set::combine($data, 'Fuelprice.{n}.id',
'Fuelprice.{n}'));

On Jun 21, 12:18 am, Petr Vytlačil  wrote:
> Hi, does anybody idea how reindexing results?
>
> Now output from CakePHP:
> 
>
> [Fuelprice] => Array
>         (
>             [0] => Array
>                 (
>                     [id] => 1
>                     [yearsetting_id] => 2
>                     [fueltype_id] => 1
>                     [price] => 26.3
>                 )
>
>             [1] => Array
>                 (
>                     [id] => 2
>                     [yearsetting_id] => 2
>                     [fueltype_id] => 2
>                     [price] => 26.3
>                 )
>
>             [2] => Array
>                 (
>                     [id] => 3
>                     [yearsetting_id] => 2
>                     [fueltype_id] => 4
>                     [price] => 26.8
>                 )
>
>         )
>
> I wish:
> -
> [Fuelprice] => Array
>         (
>             [id_item] => Array
>                 (
>                     [id] => 1
>                     [yearsetting_id] => 2
>                     [fueltype_id] => 1
>                     [price] => 26.3
>                 )
>
> 
> Example:
> -
> [Fuelprice] => Array
>         (
>             [1] => Array
>                 (
>                     [id] => 1
>                     [yearsetting_id] => 2
>                     [fueltype_id] => 1
>                     [price] => 26.3
>                 )
>
>             [2] => Array
>                 (
>                     [id] => 2
>                     [yearsetting_id] => 2
>                     [fueltype_id] => 2
>                     [price] => 26.3
>                 )
>
>             [3] => Array
>                 (
>                     [id] => 3
>                     [yearsetting_id] => 2
>                     [fueltype_id] => 4
>                     [price] => 26.8
>                 )
>
>         )
>
> THX.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Any idea how re-index results?

2009-06-20 Thread Petr Vytlačil

Hi, does anybody idea how reindexing results?

Now output from CakePHP:


[Fuelprice] => Array
(
[0] => Array
(
[id] => 1
[yearsetting_id] => 2
[fueltype_id] => 1
[price] => 26.3
)

[1] => Array
(
[id] => 2
[yearsetting_id] => 2
[fueltype_id] => 2
[price] => 26.3
)

[2] => Array
(
[id] => 3
[yearsetting_id] => 2
[fueltype_id] => 4
[price] => 26.8
)

)

I wish:
-
[Fuelprice] => Array
(
[id_item] => Array
(
[id] => 1
[yearsetting_id] => 2
[fueltype_id] => 1
[price] => 26.3
)





Example:
-
[Fuelprice] => Array
(
[1] => Array
(
[id] => 1
[yearsetting_id] => 2
[fueltype_id] => 1
[price] => 26.3
)

[2] => Array
(
[id] => 2
[yearsetting_id] => 2
[fueltype_id] => 2
[price] => 26.3
)

[3] => Array
(
[id] => 3
[yearsetting_id] => 2
[fueltype_id] => 4
[price] => 26.8
)

)


THX.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---