I've never tried setting the debug value from the controller; it's
possible that it needs to be set up beforehand.

I do this on some sites like this, in app/config/bootstrap.php:

if (isset($_GET['setthegorramdebugmode'])) {
        Configure::write('debug', $_GET['setthegorramdebugmode']);
}

(Obviously, use a different key than 'setthegorramdebugmode' - use
whatever you like).

Then just append '?setthegorramdebugmode=2' on to the end of the URL
in the browser, and it will enable debug mode, just for you.

I don't recommend keeping this in place on live sites, however. It
_should_ be safe, but you never know...

hth
grigri

On Jul 5, 4:12 pm, WhyNotSmile <sharongilmor...@gmail.com> wrote:
> Thanks.  I did that in the controller (I don't want to change it for
> everything, because it's a live site), but I get:
>
> (default) 0 query took ms Nr    Query   Error   Affected        Num. rows     
>   Took (ms)
>
> at the bottom.  Am I doing something wrong?
>
> Thanks,
> Sharon
>
>     Configure::write('debug', 2);
>
> On 5 July, 16:07, grigri <j...@hendersonwebdesign.com> wrote:
>
> > Open app/config/core.php, change the line (near the top) to
> > `Configure::write('debug', 2);` [from whatever it was].
>
> > Now when you access the page, you'll see the SQL log at the bottom.
>
> > hth
> > grigri
>
> > On Jul 5, 3:58 pm, WhyNotSmile <sharongilmor...@gmail.com> wrote:
>
> > > I'm not sure how to get that... I don't have access to the SQL log, as
> > > far as I know.  Can you suggest where I might look?
>
> > > Thanks.
>
> > > On 5 July, 15:35, grigri <j...@hendersonwebdesign.com> wrote:
>
> > > > What is the corresponding query in the SQL log?
>
> > > > On Jul 5, 3:29 pm, WhyNotSmile <sharongilmor...@gmail.com> wrote:
>
> > > > > I'm doing a paginate query, and it's returning the same row 4 times.
> > > > > The other results in the set are all present and each is shown once.
>
> > > > > Has anyone come across this before?
>
> > > > > My Users controller code is as follows:
>
> > > > >    $this->paginate = array(
> > > > >            'limit' => $limit,
> > > > >            'conditions' => $find
> > > > >    );
>
> > > > >    $userlist = $this->paginate('User');
>
> > > > > and at the point of calling this code, $limit is 34 and debug on $find
> > > > > gives:
>
> > > > > Array
> > > > > (
> > > > >     [and] => Array
> > > > >         (
> > > > >             [User.synagogue_id] => 1
> > > > >         )
>
> > > > > )
>
> > > > > Any ideas what I'm doing wrong?  The record is definitely not
> > > > > duplicated in the DB.
>
> > > > > Thanks!
>
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to