Re: how to disable query caching?

2010-06-23 Thread alagar
Sorry for my English.
You can do this before executing  query, in your model;
$db = ConnectionManager::getDataSource($this-useDbConfig);
$db-_queryCache = array();
$this-model-query();
But this will clear all cached queries
On Jun 22, 5:21 pm, Dmitry Shevchenko dmitr...@gmail.com wrote:
 Hi !
 Is there any way to disable caching for $this-model-query()
 I have used
 $this-MyModel-cacheQueries = false;  and same setting in model   var
 $cacheQueries = false;
 but seems that this isn't work

 Does anyone knew some workaround for this?
 p.s. I use CakePHP 1.2.5

 Thanks for your help.

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


Re: ajax.updater in cakephp

2010-06-22 Thread alagar
http://book.cakephp.org/view/212/Methods

On Jun 21, 6:05 pm, Petter Andreas Strøm past...@gmail.com wrote:
 Hi,

 Im quite new to both ajax and cake, so i have a question regarding the
 use of ajax.updater in cakephp. Is it possible to use the ajax.updater
 to just update an html element to contain just one cake function? (in
 other words; ive tried to give the ajax.updater the url of a cake-
 function, but then it replaces the element with a whole new page with
 its own layout etc...)

 Maybe this is some odd explanation:P

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


cakephp find('count') + groub by problem

2010-02-23 Thread alagar
Guys sorry for my English, I'm from Russia.
I have the following problem
There is a customer table with the fields id and type
I make such a request here
$result = $this-find ( 'count', array ( 'fields' =
'Client.ClientId', 'group' = 'Client.ClientType'));
I want to know the number of customers of various types;
Making debug($result); and get the number 2, then look at the query in
the debug panel
SELECT COUNT ( `Client`. `ClientId`) AS `count` FROM `Client` AS
`Client` GROUP BY `Client`. `ClientType`
now make
$ result = $ this- query ( 'SELECT COUNT ( `Client`. `ClientId`) AS
`count` FROM `Client` AS `Client` GROUP BY `Client`. `ClientType`');
debug ($result);
see
Array
(
[0] = Array
(
[0] = Array
(
[count] = 2
)

)

[1] = Array
(
[0] = Array
(
[count] = 10
)

)

)
This is a cakephp bug or am I wrong create a compelling cost $ this-
find ?
Please help

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


Re: cakephp find('count') + groub by problem

2010-02-23 Thread alagar
problem is in Model __findCount method  see 
http://api12.cakephp.org/view_source/model/#line-2040

On Feb 23, 12:57 pm, alagar ala...@nm.ru wrote:
 Guys sorry for my English, I'm from Russia.
 I have the following problem
 There is a customer table with the fields id and type
 I make such a request here
 $result = $this-find ( 'count', array ( 'fields' =
 'Client.ClientId', 'group' = 'Client.ClientType'));
 I want to know the number of customers of various types;
 Making debug($result); and get the number 2, then look at the query in
 the debug panel
 SELECT COUNT ( `Client`. `ClientId`) AS `count` FROM `Client` AS
 `Client` GROUP BY `Client`. `ClientType`
 now make
 $ result = $ this- query ( 'SELECT COUNT ( `Client`. `ClientId`) AS
 `count` FROM `Client` AS `Client` GROUP BY `Client`. `ClientType`');
 debug ($result);
 see
 Array
 (
     [0] = Array
         (
             [0] = Array
                 (
                     [count] = 2
                 )

         )

     [1] = Array
         (
             [0] = Array
                 (
                     [count] = 10
                 )

         )

 )
 This is a cakephp bug or am I wrong create a compelling cost $ this-
 find ?
 Please help

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


Re: cakephp find('count') + groub by problem

2010-02-23 Thread alagar
that would solve the problem, you need to write a query in such a way
$result = $this-find ( 'all', array ( 'fields'
='count(Client.ClientId)', 'group' = 'Client.ClientType'));
On Feb 23, 1:18 pm, alagar ala...@nm.ru wrote:
 problem is in Model __findCount method  
 seehttp://api12.cakephp.org/view_source/model/#line-2040

 On Feb 23, 12:57 pm, alagar ala...@nm.ru wrote:

  Guys sorry for my English, I'm from Russia.
  I have the following problem
  There is a customer table with the fields id and type
  I make such a request here
  $result = $this-find ( 'count', array ( 'fields' =
  'Client.ClientId', 'group' = 'Client.ClientType'));
  I want to know the number of customers of various types;
  Making debug($result); and get the number 2, then look at the query in
  the debug panel
  SELECT COUNT ( `Client`. `ClientId`) AS `count` FROM `Client` AS
  `Client` GROUP BY `Client`. `ClientType`
  now make
  $ result = $ this- query ( 'SELECT COUNT ( `Client`. `ClientId`) AS
  `count` FROM `Client` AS `Client` GROUP BY `Client`. `ClientType`');
  debug ($result);
  see
  Array
  (
      [0] = Array
          (
              [0] = Array
                  (
                      [count] = 2
                  )

          )

      [1] = Array
          (
              [0] = Array
                  (
                      [count] = 10
                  )

          )

  )
  This is a cakephp bug or am I wrong create a compelling cost $ this-
  find ?
  Please help

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


Re: can't pagination use the group by ?

2009-03-04 Thread alagar

http://book.cakephp.org/view/249/Custom-Query-Pagination

On Mar 4, 7:22 am, Rimoe meiyo...@gmail.com wrote:
 hi,
 I have write a
 var $paginate = array(
         'limit' = 50,
 'fields' = array('acc_id', 'count(*) as countnum'),
         'order' = array('countnum ' = 'desc'),
 'group' = array('acc_id')
     );

 the paginate  can't get the paginate's count,

 can't pagination use the group by ?
 or how to use the group by in paginate.

 Thanks

 rimoe
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: What do you develop in (ide, text editor, etc.)?

2009-03-03 Thread alagar

Eclipse with PDT

On Mar 1, 11:35 pm, Samuel DeVore sdev...@gmail.com wrote:
 a tutu and go go boots

 On Sun, Mar 1, 2009 at 12:34 PM, Tomás Laureano Peralta Tormey

 tomas.laureano.peralta.tor...@gmail.com wrote:
   Currently using NetBeans 6.5. The hints from this bakery article [1] were
  really useful.
   Hopefully, better support for CakePHP could be available in the near future
  (if this issue [2] get enough votes).

  [1]:
 http://bakery.cakephp.org/articles/view/model-based-code-insight-and-...
  [2]:http://www.netbeans.org/issues/show_bug.cgi?id=140918

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---