プログラミング奮闘記録

プラグラマーへ奮闘。PHP・Cakephp・JavaScript・isoアプリのコード勉強ブログです。その他の言語やツールなども使用します。

cakephp 日付で検索

こちらのサイトを参考にさせていただきました。

ありがとうございます。

ほぼそのままでイケました!!!!

 

http://kamakurasoft.net/blog/?p=1479

 

しかし、なにかよくわからい棒線がselectboxの横にできるのはなぜ??

コード見てもどこに記述されているか不明だわ〜〜

 

f:id:atsupooon:20151226020714p:plain

棒なに??

 

 

model

 

 

 

View

 

 

controller

 


      <?php
 
    class PostsController extends AppController{
 
        public $uses = array('Post','Comment');
 
        public $helpers = array('Html','Form');
 
        public $components = array('Search.Prg');
 
        public $presetVars = true;
 
        // public $presetVars = array(
        //  array('field'=>'title','type'=>'value'),
        //  array('field'=>'body','type'=>'value'),
        //  array('field'=>'end','type'=>'checkbox'),
        //  array('field'=>'start','type'=>'checkbox'),
        // );
 
        public function index(){
 
            //
            $this->Prg->commonProcess();
 
            $conditions = $this->Post->parseCriteria($this->passedArgs);
 
            $this->paginate = array(
                'limit'=>10,
                //'order'=>array('id'=>'desc'),
                'conditions'=>$conditions,
            );
            $this->set('posts',$this->paginate());
        }
    }