Re: count(*) in custom query

2006-10-08 Thread DJ Spark
I had the same problem here. how is your configuration ? mine is: - winXP - mysql 5 - php 5 - apache 1.3 spark On 10/8/06, Kevin Uni <[EMAIL PROTECTED]> wrote: > > Hi all, > I am using cake to do a custom query just like "select count(*) as num > .. from tab1 left join tab2 on tab1.id = tab2.t

Re: Still Prb with Ajax and Uft8

2006-10-08 Thread francky06l
Thanks, I manage to make modifications in the ajax.php but I will have a look into the 1.2 files Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-ph

Re: Still Prb with Ajax and Uft8

2006-10-08 Thread Grant Cox
Yes, using a Subversion client download: https://svn.cakephp.org/repo/branches/1.2.x.x/ --~--~-~--~~~---~--~~ 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.c

How to distinguish empty recordset from error in findAll()

2006-10-08 Thread milicic.marko
Here is what I do: ## Get all members $members = $this->Member->findAll(); //TODO: Figure out how to distinguish error indatabase from zero recors??? if(!$members) { $this->EventLogger->logEvent("Unable to fetch members from database!", 'FATAL_ERROR'); } $this->set('members', $members);

create variable in app_controller - then use it in another controller or view

2006-10-08 Thread gobblez
I set a variable in app_controller. Now I want to use that variable in another controller. How? I tried lots of variations, such as the $this-> thingy, gobal, $GLOBALS[''], set(), var, etc This is the variable i want available to all controllers and views: $ses = $this->Session->read('User');

Re: Still Prb with Ajax and Uft8

2006-10-08 Thread francky06l
Actually I eventually found the problem, it has been reported and there is a ticket for it : Ticket #1244 (Enhancement). This is due to the fact that code encapsulated beetween $ajax->div and $ajax->divEnd is not "decoded" as uft-8 but raw encoded. Apparently this doulf be changed in 1.2 ... Is th

Re: problems with save() and saveField()

2006-10-08 Thread nate
Also, why are you passing parameters to RequestHandler->isPost? All it does is return true or false if the request method of the current request is POST. If you're looking to require a post request for a given set of actions, you need the Security component. You can do the following in your con

Re: Is there a difference between using CakePHP on PHP5 instead of PHP4?

2006-10-08 Thread nate
There are no differences in any of those areas that are specific to Cake. Obviously your app will run better on PHP5, because it has a better engine, but that'd be the case with or without Cake. In terms of coding, there are a few minor differences. For example, if you have any model or control

Re: Still Prb with Ajax and Uft8

2006-10-08 Thread francky06l
No I did not try, but I thik this will work .. The only thing is that I do not know why the HTML rendering works and the Ajax not .. I am trying to avoid specific "language" operations, an thought that having UTF-8 will take care of this.. Ideally I want to port this model in every language, so ha

When to use query() over findAll() | Is this such a case?

2006-10-08 Thread [EMAIL PROTECTED]
Hi there, I'm writing an application in CakePHP and everything's going well so far. I've got a slight problem though in trying to order my results when the order condition is not straightforward. I have a list of Categories and a list of Cameras. These are joined by a hasAndBelongsTo relations

Elegant solution for ACL problem?

2006-10-08 Thread milicic.marko
Hi all, I'm using ACL mechanism to setup permisions for some user groups on my app. Example: Trial members have access to view action, but Full members have access to view/add/edit/delete actions. It works fine for me. But this is simplyfied example. In real world my application have 5 user gr

Re: Still Prb with Ajax and Uft8

2006-10-08 Thread Kjell Bublitz
HiWhat about using $this->set('data', trim(utf8_encode(html_entities( $string ; ?The french é also exists as html entity.Did you tried that already?2006/10/8, francky06l < [EMAIL PROTECTED]>:Just a bit more informations, I am using FireFox 1.5.0.7, with FirebugI can see the header which is :Da

Re: Still Prb with Ajax and Uft8

2006-10-08 Thread francky06l
Just a bit more informations, I am using FireFox 1.5.0.7, with Firebug I can see the header which is : Date: Sun, 08 Oct 2006 09:08:48 GMT Server: Apache/1.3.33 (Win32) PHP/5.1.2 X-Powered-By: PHP/5.1.2 Set-Cookie: CAKEPHP=df4f5b82780de858f1467ef366b41c12; path=/caketest/ CAKEPHP=df4f5b82780de858

Re: Still Prb with Ajax and Uft8

2006-10-08 Thread francky06l
Yes I am using the RequestHandler in the $components of my app_controller.php file. I really struggle to find the problem ..I keep searching. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group

Re: Is there a difference between using CakePHP on PHP5 instead of PHP4?

2006-10-08 Thread [EMAIL PROTECTED]
My application doesn't use PHP5 specific language features, and I have not yet hit any CakePHP limitations or bugs when running the my application on a PHP4 server versus a PHP5 server. *fingers crossed* --harrison --~--~-~--~~~---~--~~ You received this message