I solved...

I added this line on php.ini (MSSQL section):

mssql.datetimeconvert = Off


On 3 Lug, 02:32, Earnest <[email protected]> wrote:
> Thank you Tilen,
>
> but I'm using query() function so $useTable is not a problem. Anyway I
> tried but no way.
>
> If I use
>
> $this->set('time', $this->Tparkevent->query('SELECT [field_name]
> FROM
> [table_name] WHERE Id = 1'));
>
> it works ok except for the datetime PCTimeStamp field. It seems to me
> that the problem is the datetime mssql (eg. 01/01/98 23:59:59.999)
>
> thank you for helping me!
>
> On 3 Lug, 00:52, Tilen Majerle <[email protected]> wrote:
>
>
>
>
>
>
>
> > define your table name in your model class
>
> > var $useTable = 'tableName';
>
> > --
> > Lep pozdrav, Tilen Majerlehttp://majerle.eu
>
> > 2011/7/2 Earnest <[email protected]>
>
> > > I'm using a different table, no Tparkevent...
>
> > > On 2 Lug, 20:58, Tilen Majerle <[email protected]> wrote:
> > > > why not you do like this
>
> > > > $this->set('time', $this->Tparkevent->read(null, '1'));
>
> > > > --
> > > > Lep pozdrav, Tilen Majerlehttp://majerle.eu
>
> > > > 2011/7/2 Earnest <[email protected]>
>
> > > > > Hi,
>
> > > > > I'm running cake on a standard lamp installation. I've a controller to
> > > > > make queries to a mssql db. All goes well but a particular query
> > > > > involving a standard datatime (in mssql).
>
> > > > > The query:
>
> > > > > $this->set('time', $this->Tparkevent->query('SELECT PCTimeStamp  FROM
> > > > > [table_name] WERE Id = 1'));
>
> > > > > Well...on browser I get a blank page :(
>
> > > > > Trying a similar query but not on datetime typos, well all goes ok.
>
> > > > > Please help me...
>
> > > > > --
> > > > > Our newest site for the community: CakePHP Video Tutorials
> > > > >http://tv.cakephp.org
> > > > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp
> > > > > others with their CakePHP related questions.
>
> > > > > To unsubscribe from this group, send email to
> > > > > [email protected] For more options, visit this
> > > group
> > > > > athttp://groups.google.com/group/cake-php
>
> > > --
> > > Our newest site for the community: CakePHP Video Tutorials
> > >http://tv.cakephp.org
> > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp
> > > others with their CakePHP related questions.
>
> > > To unsubscribe from this group, send email to
> > > [email protected] For more options, visit this group
> > > athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to