HABTM queries (join stuff)

2006-07-12 Thread ginstrom
I want to query a HABTM relationship, with two relationships. Say I have tables players positions players_positions And I want to find players who are both shortstops (Position.id=1) and pitchers (Position.id=3). Is there a cake way to do this? -- Thanks, Ryan

RE: tinymce and CakePHP

2006-07-09 Thread Ryan Ginstrom
Ginstrom --~--~-~--~~~---~--~~ 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

RE: CakePHP Built-in Webservices?

2006-07-04 Thread Ryan Ginstrom
, Ryan Ginstrom --~--~-~--~~~---~--~~ 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

RE: association - foreach

2006-07-03 Thread Ryan Ginstrom
() ; } In products_controller: function color( $id ) { $this-set( 'data', $this-requestAction( /colors/getById/$id ) ) ; } // view same... And you're good to go g -- Regards, Ryan Ginstrom --~--~-~--~~~---~--~~ You received this message because you

RE: association - foreach

2006-07-03 Thread Ryan Ginstrom
will get you an empty set, and now you don't know what color you were looking for. If you go from the color model, you will get a color entry, and an empty set of products, so you will be able to tell the user, Sorry, no mauve products. -- Regards, Ryan Ginstrom

RE: association - foreach

2006-07-03 Thread Ryan Ginstrom
to create a Color model, if you don't have one. You could start with this: ?php class ColorsController extends AppController { var $name = 'Colors'; var $scaffold = true ; function getById( $id ) { return $this-Color-findById( $id ) ; } } ? -- Regards, Ryan Ginstrom

RE: requestAction crashes Apache

2006-07-01 Thread Ryan Ginstrom
be called on requestAction The simple way around this would be to check if the action on members_controller is getMember, and if so exiting beforeFilter -- Regards, Ryan Ginstrom --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Can i get $webroot for a vendor library?

2006-06-24 Thread ginstrom
Logan wrote: Because i need to used in the view and/or the controller. Probably i'm missing something. I'm kind of new to MVC. If I'm not mistaken, you can access components from the view (just not helpers from the controller). If you are serving an image generated on the fly, you could also

RE: Proof of concept: Custom validation using beforeValidate

2006-06-13 Thread Ryan Ginstrom
-setFormTag($field) ; $msg = $this-Html-tagIsInvalid($this-Html-model, $this-Html-field) ; if ( !$msg ) { return null ; } return sprintf('div class=error_message%s/div', $msg ) ; } } /* +++ */ // How does that look? -- Regards, Ryan Ginstrom

RE: Proof of concept: Custom validation using beforeValidate

2006-06-13 Thread Ryan Ginstrom
from the database. -- Regards, Ryan Ginstrom --~--~-~--~~~---~--~~ 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

RE: Uploaded Form Helper: FormationHelper

2006-06-12 Thread Ryan Ginstrom
htmlspecialchars() ) on the value, which escapes HTML entities. Since I am using my database to store HTML text, that's not what I wanted. But the latest version of my posted code supports both $this-params['data'] and $this-data. Regards, Ryan --- Ryan Ginstrom [EMAIL PROTECTED] / [EMAIL PROTECTED] http

RE: Uploaded Form Helper: FormationHelper

2006-06-12 Thread Ryan Ginstrom
( 'validations' = $validations, 'data' = $this-controller-data ) ) ; } -- Regards, Ryan Ginstrom --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake

Proof of concept: Custom validation using beforeValidate

2006-06-12 Thread ginstrom
, or if not, the fallback validation error message from HtmlHelper. Does this sound like a good direction to take my validation? Thanks for any feedback. -- Regards, Ryan Ginstrom --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

RE: Having trouble with session checking.

2006-06-02 Thread Ryan Ginstrom
' ))) { $this-checkSession() ; } return true ; } Regards, -- Ryan Ginstrom --~--~-~--~~~---~--~~ 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

Variables in routes

2006-05-24 Thread ginstrom
'='view', language=en)); But here the languages are hard coded. Thanks in advance for any help. -- Ryan Ginstrom --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake