Re: SELECT IN in WHERE clause
On Jun 1, 10:13 pm, havanna wrote: > SQL Error: 1054: Unknown column 'Array' in 'where clause' Try to post your code - and a debug print of $conditions. Regards Jonathan --~--~-~--~~~---~--~~ 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: SELECT IN in WHERE clause
On Jun 1, 7:25 pm, havanna wrote: > But if I use this one like > $conditions = array('OR' => array('Immobilien.zip' => array > ($svZipCodes))); Try to print the array: debug($conditions); You are telling cake, that the zip field should equal one string with your imploded zip codes. You are actually complicating things much more than needed. Simply use the array directly: $conditions = array('Immobilien.zip' => $saZipCodes); Regards Jonathan --~--~-~--~~~---~--~~ 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: Error with HTTPS
On Jun 1, 7:30 pm, Pablo wrote: > Did anybody see this before? Any clue? Using HTTP or HTTPS should be the same to Cake. There must be a difference between the configurations on the server. It could look like your .htaccess file is not interpreted with the HTTPS-settings. Regards Jonathan --~--~-~--~~~---~--~~ 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: Change form action id
On Jun 1, 8:35 pm, Dave wrote: > When I view the rendered HTML it shows > > > where 3 is the user.id. I am using unique slugs in the app,can I > change 3 to the user.slug and if so how can I do this? If you want to know your users by the slug, you should consider modifying the User model. However if you just want to change the post url of your form, you can use the "url" option instead of the "action" option: http://book.cakephp.org/view/186/options-url Regards Jonathan --~--~-~--~~~---~--~~ 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: Auto Increment ID in Form
On May 25, 6:55 pm, "fungied.cheese" wrote: > Where do I insert: > $this->Invoice->id:mail('@example.com', 'New order', 'Invoice id is: ' . > $this->Invoice->id); Inside the controller action - in your case it would be in the function index(). Try to go through the Blog tutorial (http://book.cakephp.org/view/219/ Blog) - it gives you a good understanding of how the different parts of Cake work together. Regards Jonathan --~--~-~--~~~---~--~~ 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: Auto Increment ID in Form
On May 25, 7:44 am, "fungied.cheese" wrote: > First person comes and filles out the form, on the top of the form it says > "Invoice 1" and once he hits submit I receive all the information in my > email including the ID number. And now second person will have invoice 2, > etc, etc. Let's say your model is called "Invoice", so by Cake conventions, you would name your controller InvoicesController. In your controller, you can save your new invoice simply by calling "save" on the model (assuming your form is created with the FormHelper): $this->Invoice->save($this->data); - then the id of the newly created invoice will be available as $this- >Invoice->id: mail('y...@example.com', 'New order', 'Invoice id is: ' . $this- >Invoice->id); (or use the email component from Cake: http://book.cakephp.org/view/176/Email) For the view, try to take a look at the FormHelper - it will create the form for you (http://book.cakephp.org/view/182/Form). Regards Jonathan --~--~-~--~~~---~--~~ 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: copying cakeapp from windows to linux
On May 24, 1:29 pm, forrestgump wrote: > i should also mention i downloaded and installed the latest version of > cakephp (CakePHP 1.2.3.8166) , and it seems to be working fine on my > ubuntu box. When you have a working installation of Cake, try to copy the content of your "app" folder from the Windows box to the app folder of the new installation. If that still doesn't work, try to look at the server's error log to get more information. You could also try to overwrite app/webroot/.htaccess and app/webroot/ index.php with fresh versions from the Cake distribution. Regards Jonathan --~--~-~--~~~---~--~~ 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: $model->save - which id is used?
On May 10, 5:52 pm, Enrique wrote: > The id can be found in $this->data. No. My first thought was that the form helper would insert a hidden field with the id - but it doesn't (and debug($this->data) shows that the id is not present in the data). Now I did some investigations, and I guess that if a controller uses only one model, this model is initialized with the id set to the first parameter passed to the action. So if you call /tests/action/123, then $this->Test->id will be 123. This seems to be done in the controllers "constructClasses()" method: http://api.cakephp.org/view_source/controller/#line-426 Please correct me if I'm wrong - otherwise I'll see if I can add a note to the documentation. Regards Jonathan --~--~-~--~~~---~--~~ 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: $model->save - which id is used?
On May 10, 4:35 pm, Rick wrote: > Take a look at $this->Recipe. I think it is in there. > > debug($this->Recipe); Yes - $this->Recipe->id is set to the correct id - but then again: How? Regards Jonathan --~--~-~--~~~---~--~~ 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: Permission problem in baking script
On May 9, 7:30 am, zarbizade wrote: > The error is something like this "Web Server has not Permission To > create file in /var/www/app/temp" . > Is there any Solution to These problem.If i try to give permission > using my root user will be work or not? No guarantee, but the /app/tmp directory must be writable by the web- server, so I guess that will work (see http://book.cakephp.org/view/31/Permissions). Regards Jonathan --~--~-~--~~~---~--~~ 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: $model->save - which id is used?
On May 10, 8:25 am, JamesF wrote: > on edit it uses the id of the record you pulled up. Thanks for your reply, - but I don't pull up anything before I call save... The id of the record to be modified is only present as a parameter to the edit function. In some "auto-magic" way, the model learns about this id. But how? Regards Jonathan --~--~-~--~~~---~--~~ 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: Poll: what do you hate about CakePHP?
On May 8, 10:39 am, Affinity wrote: > Lack of a good, proper support forum. I'll vote for that too. I would surely be more active, if the forum had an NNTP-interface. Regards Jonathan --~--~-~--~~~---~--~~ 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: Need little help with a validation rule
On Apr 29, 6:00 pm, brian wrote: > Just use a rule (eg. notEmpty) for each of them. You'll get errors for > whichever fields were not set. No, "notEmpty" will fail validation, if the field is present but empty. It will NOT fail, if the field is not set at all. If the field MUST be set, use 'required'=>true (and still use the notEmpty rule, if empty values should not be allowed). See http://book.cakephp.org/view/129/required I just learned the difference the hard way... ;-) I don't think the case when none of the fields are present can be handled by validation rules, but starkey has given a solution for this. Regards Jonathan --~--~-~--~~~---~--~~ 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: Required form field NOT marked with "required" CSS class
> IF it doesn't have to be present, its NOT a required field ;-) > > To make CakePHP add the required classes you must include the addition > rule "required"=>true That's exactly the problem: From a model point of view, the field is NOT required, but from a form point of view, it IS required. I think the form logic has a problem detecting if a field is required or not, when one field have multiple validation rules. Regards Jonathan --~--~-~--~~~---~--~~ 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: Required form field NOT marked with "required" CSS class
On Apr 28, 5:40 pm, brian wrote: > Add 'allowEmpty' = true for number. According to the documentation, that would bypass validation, if the field is present but empty. I need the opposite: IF the field is present, it must NOT be empty (and it must be unique). The validation seems to work, but the FormHelper does not recognize the field as a required field. Regards Jonathan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---