Saturday, July 2, 2011

Re: Mssql query problem

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 <tilen.maje...@gmail.com> wrote:
> define your table name in your model class
>
> var $useTable = 'tableName';
>
> --
> Lep pozdrav, Tilen Majerlehttp://majerle.eu
>
> 2011/7/2 Earnest <enrico.f...@gmail.com>
>
>
>
>
>
>
>
> > I'm using a different table, no Tparkevent...
>
> > On 2 Lug, 20:58, Tilen Majerle <tilen.maje...@gmail.com> 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 <enrico.f...@gmail.com>
>
> > > > 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
> > > > cake-php+unsubscribe@googlegroups.com 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.organd help
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscribe@googlegroups.com 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
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate