your *image_portrait* not returned? is that you mean?

2012/11/14 char <[email protected]>

> Hi all,
>
> I've got a problem which I hope is interesting to everyone.
>
> Got a generic table, in which each item has an image and an attribute that
> says wether the orientation is portriat or landscape.
>
> id int(10) unsigned NOT NULL
> namevarchar(255) NULL
> image varchar(255) NULL
> image_portrait tinyint(1) unsigned NOT NULL
>
> Now I need to paginate the results so that there are always 1 portrait
> images for every 2 landscape images.
>
> So I want a paginate with limit of 6 say, return the following:
>
> array(
>       (int) 0 => array(
>               'Item' => array(
>                       'id' => '1',
>                       'name' => 'container',
>                       'image' => 'CH1.a.jpg',
>
>
> )
>       ),
>       (int) 1 => array(
>               'Item' => array(
>                       'id' => '2',
>                       'name' => 'container',
>                       'image' => 'CH1.a.jpg'
>               )
>       ),
>       (int) 2 => array(
>               'Item' => array(
>                       'id' => '3',
>                       'name' => 'container',
>                       'image' => 'CH1.a.jpg'
>               )
>       ),
>       (int) 3 => array(
>               'Item' => array(
>                       'id' => '4',
>                       'name' => 'container',
>                       'image' => 'CH1.a.jpg'
>               )
>       ),
>
>
>
>
>  --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>
>



-- 
*Coklat Stroberi -- Web Dev Training Centre*
http://www.facebook.com/pages/Coklat-Stroberi/249514251728226  (info lebih
lanjut)
http://coklatstroberi.net
Jl. Raya Padang Luwih (Dalung) No.141 - Telp. (0361) 9006118 atau
08174128301 - Badung, Bali. Sebelah timur traffic light pertigaan perumahan
dalung permai.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en.


Reply via email to