Re: Is it a bug of CakePHP?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for relying!
But, Do not have anyway to solve this problem.

----- Original Message -----
From: "nicolas figaro" <nfigaro@xxxxxx>
To: <php-general@xxxxxxxxxxxxx>
Sent: Friday, April 07, 2006 3:49 PM
Subject: Re:  Is it a bug of CakePHP?


> Pham Huu Le Quoc Phuc a écrit :
> > I catch an error, could you tell me if you have some ideas?
> >
> > class Dsptraining extends AppModel
> > {
> >      function GetDsptrainings()
> >      {
> >           return $this->findBySql("select max(start_date) start_date
from
> > tbl_dsptrainings");
> >      }
> > }
> >
> >
> did you try your sql query directly using sql ?
> try this one :
>
> select max(start_date) as start_date from tbl_dsptrainings
>
> N F
> > class DsptrainingsController extends AppController
> > {
> >         function index()
> >         {
> >           $data = $this->Dsptraining->GetDsptrainings();
> >           echo $data[0]['start_date'];
> >       }
> > }
> >
> > Error message: Undefined index: start_date in
> > c:\Inetpub\wwwroot\Cake\app\controllers\dsptrainings_controller.php on
line
> > 33
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux