Re: Using Model in Custom Component
A... stupid me! Thanks a lot! On Dec 10, 12:53 am, grigri <[EMAIL PROTECTED]> wrote: > You've written "condition" where it should be "conditions" > > On Dec 10, 8:47 am, jjh <[EMAIL PROTECTED]> wrote: > > > I had to setup a find query inside my custom component but the find > > method doesn't seem to like my conditions array. Can anyone tell me > > what's wrong? > > > public function test($id) { > > $userInstance = ClassRegistry::init('User'); > > $param = array( > > 'condition' => array("User.id"=>$id), > > 'recursive' => -1 > > ); > > $user = $userInstance->find('all',$param); > > print_r($user);exit; > > } > > > The result is always the entire data set. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Using Model in Custom Component
I had to setup a find query inside my custom component but the find method doesn't seem to like my conditions array. Can anyone tell me what's wrong? public function test($id) { $userInstance = ClassRegistry::init('User'); $param = array( 'condition' => array("User.id"=>$id), 'recursive' => -1 ); $user = $userInstance->find('all',$param); print_r($user);exit; } The result is always the entire data set. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Using curl inside cake console
Thank you Adam. Good call on the different php.ini. Just for people who are using xampp, there are two php.ini files. Make sure to configure the php.ini in xampp\php not the one in \xampp\apache\bin \php.ini. Here's the link to xampp doc: http://www.apachefriends.org/en/faq-xampp-windows.html#phpini --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Using curl inside cake console
I tried to do the following inside my extended shell class. When I execute the script in cake console, it tells me "Fatal Error: Call to undefined function curl_init()". Anyone know if we can do curl inside shell? Thanks in advance. public function main() { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://www.google.com'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, 10); curl_setopt($ch, CURLOPT_FAILONERROR, true); $results = curl_exec($ch); if (curl_errno($ch) != 0) { $this->out("bad"); } else { $this->out("good"); } exit; } --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cron job using console or dispatcher
Sorry, I know this already. I didn't remove this post because I thought it would be a good piece of information. I think the first way (doing cron through console) is the best practice. http://manual.cakephp.org/complete/108/The-CakePHP-Console Hope this helps. On Nov 9, 10:20 am, jjh <[EMAIL PROTECTED]> wrote: > I am trying to setup a cron job in cakePHP 1.2 and so far I've seen > two ways of doing it. > > 1. First way is have the cron call the cake console to execute a > shell. > > Sample:http://www.ibm.com/developerworks/opensource/library/os-php-fwk5/?ca=... > > 2. Then there is the cron dispatcher way where you setup another > dispatcher where you make a copy of the index.php. > > Sample:http://blogchuck.com/?p=22 > > My question is which one is the best practice to execute cron job. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
cron job using console or dispatcher
I am trying to setup a cron job in cakePHP 1.2 and so far I've seen two ways of doing it. 1. First way is have the cron call the cake console to execute a shell. Sample: http://www.ibm.com/developerworks/opensource/library/os-php-fwk5/?ca=dgr-lnxw03PHP-CRON-Tasks 2. Then there is the cron dispatcher way where you setup another dispatcher where you make a copy of the index.php. Sample: http://blogchuck.com/?p=22 My question is which one is the best practice to execute cron job. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Jquery or Scriptalicious?
Personally, I use jQuery because I like the lightweight library. cakePHP does have Helper that works together with Prototype which can make development a bit easier. I think what it comes down to is which library you are more comfortable working with. On Oct 30, 3:49 pm, Matthieu <[EMAIL PROTECTED]> wrote: > Hello, > > I'm gonna create a web app using CakePHP but I'm confused about > chosing between Jquery or Scriptalious? Which one should I choose? > Does it really matter? What's the differences between them? > > tks --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Is the cookbook broken, or is it just me?
Cookbook is back up now... Thank you Cake Team. On Oct 25, 3:58 pm, Brenda <[EMAIL PROTECTED]> wrote: > Thank you so much. Your efforts on a Saturday night are much > appreciated! May the rest of your evening be peaceful. > > On Oct 25, 6:33 pm, Gwoo <[EMAIL PROTECTED]> wrote: > > > We are working on fix. Should be back up soon. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
book.cakephp is down
Sorry, I don't know who to report about http://book.cakephp.org/ being down so I just leave a message here. I see "This section has yet to be written" all over the place. Cake is awesome! --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---