All images are default category images and other category related image descriptions are created in that table. This list will display the following questions in 2 categories (Pagesgun) of categories.
Select `Class`````````````````````````````````````````````````````````````````````` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` ` `` `` , `` `` ``` `` `` `` `` `` `` `` `` `'`' `` `` `` ` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` ` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` 'Improved', `Image`. `` Image`` in the form of `image` from` images`, where `image`. ' Category_ID `IN (60, 17, 9, 33, 71, 18, 73, 30, 58, 54, 3, 44, 64, 66, 67, 11, 53, 16, 23, 68)
Pre> But in fact, the second should be like the query:
choose `image```````````````````````````` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` ` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `Image``` Image` as `Image` in category_ID (60, 17, 9, 33, 71, 18, 73, 30, 58, 54, 3, 44, 64, 66, 67, 11, 53, 16, 23, 6, 8)
may be
image
. In thedefault
= 1 WHERE section.
My Controller is FPP Index Action:
Public Function Index () {$ this- & gt; Category-> Recursive = 1; $ This- & gt; Category & gt; Behaviors-> Gave ('keep'); $ This-> gtaginate = array ("contain" => array ("image")); $ Search = ""; If (isset ($ this-> params ['name'] ['search'])) {$ search = str_replace ("% 20", "", $ this-> parameter ['name'] ['search'] ); $ Circumstances = array ('OR' = & gt; array (array ('named as category' = '>'% '. $' Search '%))); $ This- & gt; Set ('categories', $ this- & gt; paginated ($ terms)); } And {$ this- & gt; Set ('categories', $ this- & gt; paginated ()); } $ Success = $ this- & gt; Session-> Read ('success'); $ This- & gt; Set (compact ('search', 'success')); }
and in the category of my category:
many = array in public $ ('panel' = & gt; array (...) , 'Image' = & gt; array ('className' = & gt; 'image', 'foreign key' = & gt; 'category_id', 'dependent' = & gt; false, 'conditions' = & gt; array ('Image.default' = & gt; '1'), 'Field' = & gt; '', 'order' => "',' limit '= & gt;", "' offset '= & Gt; '', 'Exclusive' =>, '', 'Finder' =>; '', 'countertype' =>););
Therefore, I have to filter the joining table images. Set the default set to '1'
No comments:
Post a Comment