Re: DboSource::showLog and ajax.

2006-06-09 Thread josh robb

cool - thanks!

On 6/8/06, nate <[EMAIL PROTECTED]> wrote:
>
> Just kidding, forget about it.  I already added the table id thing.  It
> should show up in the nightlies in the next few days.
>
> If you want to keep debug mode on, but not show the query dump, just
> set DEBUG to 1.
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: DboSource::showLog and ajax.

2006-06-08 Thread nate

Just kidding, forget about it.  I already added the table id thing.  It
should show up in the nightlies in the next few days.

If you want to keep debug mode on, but not show the query dump, just
set DEBUG to 1.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: DboSource::showLog and ajax.

2006-06-08 Thread josh robb

Cool - I'll do that - after thinking about it I'd prefer that the
query log got included with $cakeDebug - or maybe a seperate variable.

j.

On 6/8/06, nate <[EMAIL PROTECTED]> wrote:
>
> We're working on making the debug settings slightly more flexible for
> Cake 2.0.  Adding an id to the table is also a reasonably good idea.
> If you go to https://trac.cakephp.org, you can submit an enhancement
> ticket for it.
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: DboSource::showLog and ajax.

2006-06-08 Thread nate

We're working on making the debug settings slightly more flexible for
Cake 2.0.  Adding an id to the table is also a reasonably good idea.
If you go to https://trac.cakephp.org, you can submit an enhancement
ticket for it.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: DboSource::showLog and ajax.

2006-06-08 Thread josh robb

nate,

Thanks for that - that works great! I've got one more related question
for the group.

I've had to make a small change to DboSource::showLog() to add a   wrapper to the whole thing. (Guess I could have
added an id= to the table on reflection). This allows me to hide the
query results by default and have them shown using a little control
pannel I create using CSS.

Two questions:

1. Is there a better way to do this without modifying the core libs?
if not then...
2. Would this be useful to anyone else? or does it seem like a good
idea? Probibally the nicest thing would be to have something like
$cakeDebug for the sql log - then people could do what they want with
it. 

j.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: DboSource::showLog and ajax.

2006-06-06 Thread nate

Yeah, just add this to your controller:

var $components = array('RequestHandler');

function beforeFilter( ) {
if ($this->RequestHandler->isAjax()) {
$db =& ConnectionManager::getDataSource('default');
$db->fullDebug = false;
}
}

No core hacking required.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: DboSource::showLog and ajax.

2006-06-06 Thread josh robb

Yeah - I was hoping that there would be a clever way of making ajax
calls work while DEBUG was > 1.

I'd code it myself - but I couldn't figure out how to get the
controller instance from DboSource.

Any ideas?

j.

On 6/6/06, nate <[EMAIL PROTECTED]> wrote:
>
> You sort of answered your own question.  If DEBUG is set to 2 or
> higher, your query log will get printed.  Set it to 1 or lower, and it
> will not get printed.
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: DboSource::showLog and ajax.

2006-06-06 Thread nate

You sort of answered your own question.  If DEBUG is set to 2 or
higher, your query log will get printed.  Set it to 1 or lower, and it
will not get printed.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: DboSource::showLog and ajax.

2006-06-06 Thread josh robb

Sorry - should add that I have:

define('DEBUG', 2);

Set while I'm developing.

j.


On 6/6/06, josh robb <[EMAIL PROTECTED]> wrote:
> Sorry - should add that I have:
>
> define('DEBUG', 2);
>
> Set while I'm developing.
>
> j.
>
> On 6/6/06, josh robb <[EMAIL PROTECTED]> wrote:
> >
> > Hi there,
> >
> > I'm making some ajax calls to one of my controllers and the query log
> > is being appended to the result.
> >
> > Is this a know problem or have I broken something somewhere?
> >
> > j.
> >
> >
> > > >
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



DboSource::showLog and ajax.

2006-06-06 Thread josh robb

Hi there,

I'm making some ajax calls to one of my controllers and the query log
is being appended to the result.

Is this a know problem or have I broken something somewhere? 

j.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---