Re: MySQL version to install
It should not matter to PHP which version you go with as long as it is a "stable" release. I have never had any problems with any of the official releases of MySQL for Mac OS X (except for that thing with the socket when Leopard was released). I still run 5.0.xx here but that is just because I have not has any reason to upgrade. /Martin On Apr 14, 7:47 pm, Bob Albert wrote: > I'm going to build a new server and I'm wondering which version of > MySQL i should install 5 or 5.1? > > I'm going to install on a Dual G5 Power Mac running Leopard's version > of PHP 5 and Apache 2. > > Does it mater to PHP or even Cake if MySQL is version 5 or 5.1? I > would assume I'd want the most recent, meaning 5.1, but curious if > there are any compatibility issues for Cake or PHP. > > Thanks, > Bob --~--~-~--~~~---~--~~ 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: Preferred way to delete with conditions?
You were right of-course. I don't know what I messed up when I first tried using deleteAll but it works as I expect it now with callbacks and all. thanks Martin On Apr 14, 7:15 pm, Martin Westin wrote: > Hm... thought I had... > I'll give it another try. > > On Apr 14, 2:01 pm, grigri wrote: > > > Looking at the signature for `deleteAll` should answer your question: > > > > function deleteAll($conditions, $cascade = true, $callbacks = false) > > > In the version of cake I'm using, it does say in the comments that > > $callbacks is "not being used", but a quick view of the code shows > > that it is. > > > If you enable both $cascade and $callbacks you should get the effect > > you're looking for. > > > hth > > grigri > > > On Apr 14, 12:28 pm, Martin Westin wrote: > > > > Hi, > > > I frequently need to verify that deleting a record is allowed. I was > > > wondering how others handle this kind of "conditional delete"? > > > > When finding I can very simply add on an extra condition to check that > > > some field matches my requirement. Using the common Blog-analogy it > > > might be finding only published posts (published = 1) or similar > > > "static" requirement. > > > > For deletes I have nothing similar to check, say, published = 0 so > > > that I don't delete published posts for example. It might be to > > > disallow deleting of users with admin privileges and a number of other > > > fairly common cases. > > > > A good example would be a "Folder hasMany dependent File" (these are > > > reserved words but as a meta-example). When deleting a Folder the user > > > doing the deleting needs write access to the folder and each file > > > needs to "beforeDelete" each physical file before deleting the > > > database record. > > > > deleteAll will not work here (afaik) since I need the callbacks to > > > fire on the dependent model and I need a condition on the primary > > > model. > > > > I first have to "find" to verify if the delete can take place, which > > > is extra queries (and for-loops). Is there an option better than using > > > find('list'), foreach and del ? > > > > /Martin --~--~-~--~~~---~--~~ 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: Getting kicked out by auth when displaying blobs
This is true I hope, I am using prepared statements with mysqli so they should be getting cached as far as I can tell from the documentation. Is a database not a file anyway? On Apr 15, 12:33 pm, Sidney wrote: > Without discussing the pros/cons of whether to use blobs in the 1st > place, one point to note is that with caching, the binary data will > get served from the file system in most cases anyway. > > On Apr 15, 9:08 am, Rufus wrote: > > > The images are from 4-20k max and it seems pretty darn speedy. Also > > the web app is just a management portal for an advertising widget, so > > it will only be used by 3 or 4 people at any one time. > > > So I think nobody can argue that it is not ok to store it as a blob in > > this situation? > > > On Apr 15, 2:04 am, brian wrote: > > > > On Tue, Apr 14, 2009 at 3:45 AM, burzum wrote: > > > > > You should use the MediaView class (see API documentation) to send or > > > > display the file data. > > > > I hadn't thought of that. I suppose it would need to be overloaded, > > > though, to deal with data from the DB. > > > > > And files should not be stored in a database in > > > > the case of a web app. > > > > That's a matter of opinion (and use-case). I certainly wouldn't do > > > that for regular images but there are legitimate reasons for storing > > > some files in a DB. --~--~-~--~~~---~--~~ 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: Auth components
Thanks to Gonzalo Servat & brian. problem solved. On Apr 12, 3:04 pm, Gonzalo Servat wrote: > On Sun, Apr 12, 2009 at 3:52 AM, gimmebucks wrote: > > > I want the system to display : > > "You are not authorized to access that location." > > > But not > > "You are not authorized to access that location. > > 1" > > > Please help. > > Just like brian said, remove the echo. Instead of: > > echo $session->flash('auth'); > > .. try: > > $session->flash('auth'); > > You're seeing the additional "1" because the flash() function returns a > boolean which indicates the result of the call to the flash() method. The > printing of the error message itself is done automatically inside the > flash() function so you don't need to echo the result out. > > - Gonzalo --~--~-~--~~~---~--~~ 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: How to add jquery script?
Its $javascript->link(), not the $html. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
How to add jquery script?
Hallow,, I want to ask how to add some javascript (jquery)? Because I used this Javascript('jquery-1.3.2.min.js');?> Javascript('jquery.datepick.js');?> In views/layout/default.ctp but this error keep showing *Warning* (512) : Method HtmlHelper::Javascript does not exist [*CORE\cake\libs\view\helper.php*, line *143*] I put my .js script in webroot/js/ Thanks -- "One of the mankind greatest enemy is man itself" -Gendo Ikari --~--~-~--~~~---~--~~ 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: Getting kicked out by auth when displaying blobs
Without discussing the pros/cons of whether to use blobs in the 1st place, one point to note is that with caching, the binary data will get served from the file system in most cases anyway. On Apr 15, 9:08 am, Rufus wrote: > The images are from 4-20k max and it seems pretty darn speedy. Also > the web app is just a management portal for an advertising widget, so > it will only be used by 3 or 4 people at any one time. > > So I think nobody can argue that it is not ok to store it as a blob in > this situation? > > On Apr 15, 2:04 am, brian wrote: > > > On Tue, Apr 14, 2009 at 3:45 AM, burzum wrote: > > > > You should use the MediaView class (see API documentation) to send or > > > display the file data. > > > I hadn't thought of that. I suppose it would need to be overloaded, > > though, to deal with data from the DB. > > > > And files should not be stored in a database in > > > the case of a web app. > > > That's a matter of opinion (and use-case). I certainly wouldn't do > > that for regular images but there are legitimate reasons for storing > > some files in a DB. --~--~-~--~~~---~--~~ 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: One view to bind them all?
Thanks, Brian. That is exactly what I needed. On Apr 13, 1:40 pm, brian wrote: > On Mon, Apr 13, 2009 at 2:06 PM, Joseph Roberts > > > > wrote: > > > Greetings fellow bakers, > > > I need help with a development project where I work at a rescue > > mission. I am creating a volunteer management system that involves > > many models such as: groups, jobs, volunteers, skeleton_jobs and > > scheduled_jobs. Being new to CakePHP, this is my quandary: How do I > > implement MVC in this case? > > > I would like to haveoneview, let's call it volunteer_manager.ctp, > > that accesses information fromallthese aforementioned models and > > displays the data in tags in an iTunes-esque display so that > > everything is ononescreen (i.e. mini calendar, scrollable divs for > > lists of groups, volunteers and jobs). I have a prototype working with > > drag and drop capability, but am running into issues with > > requestAction. Some resources I've read have said requestAction is a > > "bad practice." > > > That being said, how to I utilize data from a number of MVC > > relationships in a singleviewwithout using requestAction? Should I > > turn the groups, departments, volunteers, and jobs into elements that > > are included within volunteer_manager.ctp? Each of these elements > > requires the basic CRUD functions. Perhaps I'm not conceptualizing > > elements properly, but from the Cookbook's description they seem to be > > rather limited display aids rather than full blown MVC relationships. > > I need help understanding elements or a viable alternative because the > > relationships in this app are getting complicated and I don't want to > > design myself into a corner. > > > For instance, when I click on a date in the mini calendar not only is > > the calendar div updated, but the jobs div should be updated to > > reflectallavailable jobs for that day AND the groups, volunteers, > > and scheduled jobs should be updated as well. This requires a number > > of requestAction calls as it now stands. > > > Perhaps I should get away from Ajax calls to update the individual > > tags in volunteer_manager.ctp, but I don't want to reload the > > screen (and reload every bit of data in the divs) just becauseonediv > > element needs to change. > > You can use a generalised manager ontroller to fetch the data from > several models. Whether you include those other models in the > controller's $uses array or use ClassRegistry::init() as needed is up > to you (maybe you don't wantallof the models loaded for every > action). > > You can still use ajax to make changes. Just point the requests to the > appropriate controller. The link may be in aviewfor > volunteer_manager but it can point to any other controller. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
A newbie questions about URLs
I have uploaded cake to a testing folder on my domain hbit.ie to play around with it and see what I can do. I have called my testing folder.. wait for it 'cake' :) Can someone tell me if this is right.. the url http://hbit.ie/cake/ shows the installation is ok. but if i leave out the trailing slash ( http://hbit.ie/cake ), I get a bad request page returned, Do I need to configure something, or is this normal behaviour? Thanks Kevin --~--~-~--~~~---~--~~ 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: Getting kicked out by auth when displaying blobs
The images are from 4-20k max and it seems pretty darn speedy. Also the web app is just a management portal for an advertising widget, so it will only be used by 3 or 4 people at any one time. So I think nobody can argue that it is not ok to store it as a blob in this situation? On Apr 15, 2:04 am, brian wrote: > On Tue, Apr 14, 2009 at 3:45 AM, burzum wrote: > > > You should use the MediaView class (see API documentation) to send or > > display the file data. > > I hadn't thought of that. I suppose it would need to be overloaded, > though, to deal with data from the DB. > > > And files should not be stored in a database in > > the case of a web app. > > That's a matter of opinion (and use-case). I certainly wouldn't do > that for regular images but there are legitimate reasons for storing > some files in a DB. --~--~-~--~~~---~--~~ 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: Run an action with out a view? Is it possible?
oh, i just relized that this was your first point here^^ my mistake, overread that one On 15 Apr., 00:44, "Mark (Germany)" wrote: > you forgot one: > > $this->redirect() > > as it always ends with exit() anyway > > but the proper way without redirect would be: > > $this->autoRender = false (anywhere inside that method in the > controller) > > On 15 Apr., 00:08, Miles J wrote: > > > You can either do the following: > > > - Have the delete action redirect once the logic is finished > > - Put $this->autoRender = false; at the top of the action > > - Put an exit() at the end of the action > > > I personally would do the 1st or 2nd. --~--~-~--~~~---~--~~ 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: Run an action with out a view? Is it possible?
you forgot one: $this->redirect() as it always ends with exit() anyway but the proper way without redirect would be: $this->autoRender = false (anywhere inside that method in the controller) On 15 Apr., 00:08, Miles J wrote: > You can either do the following: > > - Have the delete action redirect once the logic is finished > - Put $this->autoRender = false; at the top of the action > - Put an exit() at the end of the action > > I personally would do the 1st or 2nd. --~--~-~--~~~---~--~~ 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: Run an action with out a view? Is it possible?
You can either do the following: - Have the delete action redirect once the logic is finished - Put $this->autoRender = false; at the top of the action - Put an exit() at the end of the action I personally would do the 1st or 2nd. --~--~-~--~~~---~--~~ 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 hosting service do you use?
I use Dreamhost and MT. Both work well but the MT DV server took a lot of configuration to get cake working. --~--~-~--~~~---~--~~ 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 hosting service do you use?
I use downtown host. www.downtownhost.com --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Run an action with out a view? Is it possible?
Has anyone come up with a solution where I don't need to have an empty view for some actions? For example I have a delete function that I call. Which its stupid that I need to have an empty view with nothing in it when calling this function. Is there anyway around this? This goes the same for when making ajax post calls using an ext datagrid. There is nothing that the view actually does but it still requires me to have a view inorder to reach the controller to get the correct action to happen. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
ACL for some fields
Hello all bakers, I've used ACL many times before, but with a new site I have a problem that can be solved manually but I want to do it in ACL way (if any). Let's say I have a posts table, in posts table there is 'id', 'title', 'body' and 'notes', I want to give the user only the ability to write the title and body, and the admin to write the notes, do you have any ideas or suggestions to do that in ACL? Thanks in advanced. --~--~-~--~~~---~--~~ 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 and the Quickbooks SDKs
Has anyone played around with CakePHP and the Quickbooks SDK's? To me for an actual storefront, these don't look like good solutions unless you use their Online products. Any opinions? --~--~-~--~~~---~--~~ 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: Contain and extra sql queries
I mean, you cant ALWAYS use joins to get all data with 1 query. CakePHP is limited in that use. Else do it yourself and write a manual query. --~--~-~--~~~---~--~~ 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: jQuery UI Datepicker not working
When your calling datepicker(), shouldnt it be on ready when the page loads? --~--~-~--~~~---~--~~ 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: jQuery UI Datepicker not working
Hello. Yeah, tried that. It shows that it is throwing an error when it tries to call the Javascript function. There's got to be something wrong with my paths to the js and css files. Does anything stick out? Thanks On Apr 14, 3:08 pm, Marcin Domanski wrote: > Hey, > getfirebug.com and look at the console/parse output > HTH, > -- > Marcin Domanskihttp://kabturek.info > > On Tue, Apr 14, 2009 at 19:44, cpeele wrote: > > > Hey guys, > > > I'm running CakePHP 1.2 and am trying to use the jQuery UI Datepicker > > but I'm running into some problems. > > Actually, nothing happens. > > > Here are the paths to the necessary jQuery files: > > > Javscript files: > > htdocs\TeamPlayer\app\webroot\js > > > CSS files: > > htdocs\TeamPlayer\app\webroot\css\smoothness > > > Here's the view code: > > > $html->css('smoothness/jquery-ui-1.7.custom'), null, null, false); > > $javascript->link(array('jquery-1.3.2.min', 'jquery- > > ui-1.7.custom.min'), false); > > ?> > > > > > $(function() { > > $("#datepicker").datepicker(); > > }); > > > > > > > > Which outputs the following in the browsers view source: > > > > >
Re: jQuery UI Datepicker not working
Hey, getfirebug.com and look at the console/parse output HTH, -- Marcin Domanski http://kabturek.info On Tue, Apr 14, 2009 at 19:44, cpeele wrote: > > > Hey guys, > > I'm running CakePHP 1.2 and am trying to use the jQuery UI Datepicker > but I'm running into some problems. > Actually, nothing happens. > > Here are the paths to the necessary jQuery files: > > Javscript files: > htdocs\TeamPlayer\app\webroot\js > > CSS files: > htdocs\TeamPlayer\app\webroot\css\smoothness > > Here's the view code: > $html->css('smoothness/jquery-ui-1.7.custom'), null, null, false); > $javascript->link(array('jquery-1.3.2.min', 'jquery- > ui-1.7.custom.min'), false); > ?> > > > $(function() { > $("#datepicker").datepicker(); > }); > > > > > > > Which outputs the following in the browsers view source: > > >
Help with Ajax form and CSS Styling
Hi I'm having some trouble with a form that I have styled in my CSS but when it's loaded from an Ajax call it's not picking up the CSS styles view.ctp: used for viewing entries in my DB, I have "edit" links that link to specific actions in my contoller that allows users to update/edit DB entries. >From view.ctp: Genre /*This div contains an "edit" link. Users can click edit and the edit_genre action will be called and displays the edit_genre.ctp in the "genreform" div listed below.*/ link('Edit Genre', 'edit_genre/'.$movie['Movie'] ['id'], array('update' => 'genreform'));?> //this section lists out the current "genre" entries in the DB for a particular movie. /* Problem Area code from edit_genre.ctp will go here when user clicks "Edit Genre" CSS Styling does not appear when user clicks edit and code is pulled from edit_genre.ctp. However if I manually place form code here the styling is picked up. */ from edit_genre.ctp: This code is inserted into view.ctp "genreform" div when user clicks "Edit Genre" create('Movie');?> input('id'); echo $form->input('Genre', array( 'type' => 'select', 'multiple' => 'checkbox' )); ?> end('Submit');?> Thanks in advance for any advice. --~--~-~--~~~---~--~~ 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: "$javascript->codeBlock" Question
I found the solution using cacheEvents(); Like this: function adicionarLegenda($legendas){ $this->Javascript->cacheEvents(); foreach ( $legendas as $id => $texto ) { $this->Javascript->event($id, "mouseover", "legenda('".$texto."')", false); $this->Javascript->event($id, "mouseout", "UnTip()", false); } $saida = $this->output($this->Javascript->getCache()); return $this->Javascript->codeBlock($saida); } On 14 abr, 11:04, Celso wrote: > How is the right way? > > $script = $javascript->event($id, "mouseover", "legenda('". > $texto."')", false). > $javascript->event($id, "mouseout", "UnTip()", false); > > echo $javascript->codeBlock($script,null); --~--~-~--~~~---~--~~ 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: Getting "5 Related" Books via multiple Genres (HABTM ) from within Book view() and without requestAction
Thanks brian. I checked those out and after a few attempts I got it workingthat is until I tried to add a 'contain'. If I try to bring in some more data with the contain then the whole thing returns nothing. If I comment out the 'group' then I get data again, although this is the wrong data. I'm afraid my SQL skills are not good to know why it would do this...ah well. I do still have something that works using my previous way, even if it's not the best. Perhaps in the future when I get more time I'll spend several days (weeks more likely ;- ) trying to figure out that solution. Cheers, Mike On Apr 13, 6:54 pm, brian wrote: > I didn't realise it was HABTM. That changes things. See these posts: > > http://teknoid.wordpress.com/2008/08/06/habtm-and-join-trickery-with-...http://bakery.cakephp.org/articles/view/quick-tip-doing-ad-hoc-joins-... > > On Mon, Apr 13, 2009 at 4:48 AM, Mike Cook wrote: > > > brian, when I try this though I get an " Unknown column > > 'Book.genre_id' in 'where clause' " error. > > > SELECT `Book`.`id`, `Book`.`title`, `Book`.`slug`, `Language`.`id`, > > `Language`.`name` FROM `books` AS `Book` LEFT JOIN `languages` AS > > `Language` ON (`Book`.`language_id` = `Language`.`id`) WHERE > > `Book`.`genre_id` = ('1') ORDER BY `slug` ASC > > > I guess then Cake 'should' be able to access genre_id from the JOIN > > table, but I don't know why it is not. I believe the HABTM > > relationships are set up correctly; > > > // book.php > > var $hasAndBelongsToMany = array( > > 'Genre' => array( > > 'className' => 'Genre', > > 'joinTable' => 'books_genres', > > 'foreignKey' => 'book_id', > > 'associationForeignKey' => 'genre_id', > > 'unique' => true, > > 'order' => 'name ASC' > > ), > > ) > > > // genre.php > > var $hasAndBelongsToMany = array( > > 'Book' => array( > > 'className' => 'Book', > > 'joinTable' => 'books_genres', > > 'foreignKey' => 'genre_id', > > 'associationForeignKey' => 'book_id', > > 'unique' => true, > > 'order' => 'slug ASC', > > ) > > ); > > > Mike > > > On Apr 12, 9:25 pm, brian wrote: > >> There's no need to search on Genre as you have the foreign key already. > > >> function similar($genre_id) > >> { > >> return $this->find( > >> 'all', > >> array( > >> 'fields' => array( > >> 'Book.id', > >> 'Book.title', > >> 'Book.slug' > >> ), > >> 'conditions' => array( > >> 'Book.genre_id' => $genre_id > >> ), > >> 'contain' => array( > >> 'Author' => array( > >> 'fields' => array( > >> 'Author.id', > >> 'Author.slug', > >> 'Author.lastname' > >> ) > >> ), > >> 'Language' => array( > >> 'fields' => array( > >> 'Language.id', > >> 'Language.name' > >> ) > >> ) > >> ) > >> ) > >> ); > > >> } > >> On Sun, Apr 12, 2009 at 8:25 AM, Mike Cook wrote: > > >> > Okay, so after more searching around I found a post by pkclarke who > >> > makes use of a search on the join table, and then uses a find() with > >> > those results. > > >> > I still have the feeling this is not the best way it should be done, > >> > but I think this approach will allow me to move forwardand no > >> > requestAction. > > >> > // in the book.php model > >> > function similar($id) { > > >> > $books_genres = $this->BooksGenre->find('list', > >> > array( > >> > 'conditions' => array('genre_id' => $id), > >> > 'fields' => array('book_id'), > >> > 'limit' => 5, > >> > 'order' => 'RAND()', > >> > ) > >> > ); > > >> > $similarBooks = array(); > >> > foreach ($books_genres as $value) { > >> > $book = $this->find('first', > >> > array( > >> > 'conditions' => array('Book.id' => $value), > >> > 'contain' => array( > >> > 'Author' => array('fields' => array('id', 'slug', > >> > 'lastname')), > >> > 'Language' => array('fields' => array('id', 'name')), > >> > ), > >> > 'fields' => array('id', 'slug', 'title') > >> > ) > >> > ); > >> > $similarBooks[] = $boo
Re: app location/name
i feel lame, but how do i use the -app param? On Apr 14, 10:49 am, Gwoo wrote: > cd mysitename > > or use the -app param --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
jQuery UI Datepicker not working
Hey guys, I'm running CakePHP 1.2 and am trying to use the jQuery UI Datepicker but I'm running into some problems. Actually, nothing happens. Here are the paths to the necessary jQuery files: Javscript files: htdocs\TeamPlayer\app\webroot\js CSS files: htdocs\TeamPlayer\app\webroot\css\smoothness Here's the view code: css('smoothness/jquery-ui-1.7.custom'), null, null, false); $javascript->link(array('jquery-1.3.2.min', 'jquery- ui-1.7.custom.min'), false); ?> $(function() { $("#datepicker").datepicker(); }); Which outputs the following in the browsers view source: I'm not sure what I am doing wrong. The textbox appears but no calendar pops up. Any help would be greatly appreciate! Thanks, Chris --~--~-~--~~~---~--~~ 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: app location/name
cd mysitename or use the -app param --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
MySQL version to install
I'm going to build a new server and I'm wondering which version of MySQL i should install 5 or 5.1? I'm going to install on a Dual G5 Power Mac running Leopard's version of PHP 5 and Apache 2. Does it mater to PHP or even Cake if MySQL is version 5 or 5.1? I would assume I'd want the most recent, meaning 5.1, but curious if there are any compatibility issues for Cake or PHP. Thanks, Bob --~--~-~--~~~---~--~~ 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: easy way to find out if onetomany record is used (before deleting it)?
Thanks, that's what I was looking for, I have not used behaviors yet. While researching beforeDelete I came across the hasAny() function which also helps. My current way of doing things also displays a list of all the records ("books") that belongTo the record that has been attempted to be deleted ("author"), so the jury's still out on if coding this with a behavior would simplify things. I'll have to experiment a bit more. On Apr 14, 11:26 am, Richard wrote: > Depending on your database, you may be able to use constraints on the > foreign keys of your database ("ON DELETE RESTRICT"), however that's a > responsive check rather than pro-active. In your situation, you may find > creating a behavior would be beneficial. The behavior would run the checks > on the beforeDelete callback and you can restrict it at that level instead > of a database. > > Richard > > On Tue, Apr 14, 2009 at 3:41 PM, qwanta wrote: > > > In the case where If I have a one to many relationship like Authors- > > >Books and I would like to delete an author - but only if this author > > has no books - is there a buiilt-in way to check? > > > I find that I run into this situation a lot (every time a table has a > > foreign key), and at the moment manually write a function in the model > > to check this. eg. for the Books model a method with the author_id as > > parameter that returns true if the author has books, false otherwise. > > But it seems like cakephp should be able to check this based on the > > model relationships, so is there something built-in I am missing? > > > Thanks --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
textBox autocomplete Help Help Plz
hello! i am new in cakephp. can any body give me simple and easy example of how to make text box of form auto complete.means if i type book name then it displays the hint of books that typed. kindly any body help me i have to complete my project. thanks to regards, khurram --~--~-~--~~~---~--~~ 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: Preferred way to delete with conditions?
Hm... thought I had... I'll give it another try. On Apr 14, 2:01 pm, grigri wrote: > Looking at the signature for `deleteAll` should answer your question: > > > function deleteAll($conditions, $cascade = true, $callbacks = false) > > In the version of cake I'm using, it does say in the comments that > $callbacks is "not being used", but a quick view of the code shows > that it is. > > If you enable both $cascade and $callbacks you should get the effect > you're looking for. > > hth > grigri > > On Apr 14, 12:28 pm, Martin Westin wrote: > > > Hi, > > I frequently need to verify that deleting a record is allowed. I was > > wondering how others handle this kind of "conditional delete"? > > > When finding I can very simply add on an extra condition to check that > > some field matches my requirement. Using the common Blog-analogy it > > might be finding only published posts (published = 1) or similar > > "static" requirement. > > > For deletes I have nothing similar to check, say, published = 0 so > > that I don't delete published posts for example. It might be to > > disallow deleting of users with admin privileges and a number of other > > fairly common cases. > > > A good example would be a "Folder hasMany dependent File" (these are > > reserved words but as a meta-example). When deleting a Folder the user > > doing the deleting needs write access to the folder and each file > > needs to "beforeDelete" each physical file before deleting the > > database record. > > > deleteAll will not work here (afaik) since I need the callbacks to > > fire on the dependent model and I need a condition on the primary > > model. > > > I first have to "find" to verify if the delete can take place, which > > is extra queries (and for-loops). Is there an option better than using > > find('list'), foreach and del ? > > > /Martin --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
app location/name
i am new to cake, and just started my first 'bake'. While begining, i was asked the name of my app. So i typed in the name, and now i have the following structure: app cake mysitename (which looks exatcly like app, but with AppController and AppModel extended) vendors the problem is when i try to come back and bake, it always tries to put my newly created model/controller/view into the app dir, but my site is now in mysitename dir. is there a way to tell cake that my site is not app, but mysitename? --~--~-~--~~~---~--~~ 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: Getting kicked out by auth when displaying blobs
On Tue, Apr 14, 2009 at 3:45 AM, burzum wrote: > > You should use the MediaView class (see API documentation) to send or > display the file data. I hadn't thought of that. I suppose it would need to be overloaded, though, to deal with data from the DB. > And files should not be stored in a database in > the case of a web app. That's a matter of opinion (and use-case). I certainly wouldn't do that for regular images but there are legitimate reasons for storing some files in a DB. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Freelancer Wanted
First off - This is not a cake project. I am posting here because I respect the cake community and I would like to offer this work to someone in this community first. So please refrain from the "post somewhere else" replies. Here is the site in question: https://www.brevardcounty.com/directory/members/ Th site is built with codeigniter (don't blame me; I didn't do it) and the directory that we are logging into is phpmydirectory. The issue is that on some windows machines with IE the user keeps getting returned to the login screen without any errors. I think that the cookie is not being saved. Computers with security software like Norton 360 are more likely to have this issue. I don't know if the issue is being caused by the SSL, Phpmydirectory or my headers and footers on the page. I also created this stripped down page for testing but it might be a flawed test as it posts to a non-stripped down page: https://www.brevardcounty.com/directory/members/test_login.php So I need someone who can recreate the problem (necessary for testing) and who would like to try to fix the problem. This might be easy for someone who has dealt with this kind of issue before. Please email me [ t...@scbmediagroup.com ] or post if you are interested or have suggestions. Thanks!!! --~--~-~--~~~---~--~~ 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: Help for ajax update form field
Great Arvind , well I'll try this as soon as possible :) Definitely you have considered two fields: - AlbumNametext - albumNameMsg Where the last if no text insered still fill with the phrase in red: Please enter album name Very good, I'll notice u if the solution is good or not :) But if someone have another option please be free to send me :) Best Regards Franco Tampieri Franco Tampieri Details: - Linux User #286282 - FSF Member #5827 GNU/Linux: Hardened / Embedded / H.A. Cluster / System Integrator Certification: ECDL / LPIC 1 - Acquiring Certification: Cisco CCNA / LPIC 2 Sent from Bologna, Emilia Romagna, Italia 2009/4/14 Arvind > > Use $ajax->observeField method of ajax helper. Here is an example: > > > echo $ajax->observeField("AlbumNametext",array > ('url'=>'checkAlbumName','update'=>'albumNameMsg','loading'=>"Element.show > ('loaderIDCheck')",'loaded'=>"Element.hide > ('loaderIDCheck')",'before'=> >"if($('AlbumNametext').value == ''){ >$('albumNameMsg').innerHTML='Please enter album name'; >$('albumNameMsg').style.color='red'; >return false; > } > else { > $('albumNameMsg').innerHTML=''; > }")); > ?> > > On Apr 14, 6:19 pm, "Dr.Dran" wrote: > > Hi! > > > > I'm a newbe, I try to make my new application with cake, there is a > > simple shopping cart. > > > > I have in particular two field that one is the quantoty and one is the > > price. > > > > My problem is that I want when i fill the quantity field the price > > field change his value that was a simple product of the price for the > > quantity... > > > > I found in ajax inhttp://ajaxtags.sourceforge.netth function Update > > Field that seems do what I need: "Updates one or more form field > > values based on response to text entered in another field" > > > > There is the same thing in cake ajaxhelper? There is some examples? > > > > Best regards > > > > Franco Tampieri > > > > P.S. Excuse me for my bad english :P > > > --~--~-~--~~~---~--~~ 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 see anything
You'll also be needing to turn on mod_rewrite. http://book.cakephp.org/view/37/Apache-and-mod_rewrite-and-htaccess http://book.cakephp.org/view/32/Installation On Tue, Apr 14, 2009 at 11:05 AM, Christian Leskowsky < christian.leskow...@gmail.com> wrote: > Did you set "AllowOverrides" to "All" in your http.conf? > > > On Tue, Apr 14, 2009 at 10:42 AM, mcphisto wrote: > >> >> Hi, >> I just baked my first application on cake 1.2. >> With the bake console I did all the configuration. So now I've on the >> first page this: Sweet, "App" got Baked by CakePHP!. >> The problem is that if I go 127.0.0.1/categories, it doesn't find >> nothing. >> I configured gverything so that my app is on c:\program fils\easy php >> 3.0\www\app. >> Why I cant get the views pages? >> >> Thank you. >> >> >> >> > > > -- > - > > "You can't reason people out of a position they didn't use reason to get > into." > > Christian Leskowsky > > -- - "You can't reason people out of a position they didn't use reason to get into." Christian Leskowsky --~--~-~--~~~---~--~~ 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: easy way to find out if onetomany record is used (before deleting it)?
Depending on your database, you may be able to use constraints on the foreign keys of your database ("ON DELETE RESTRICT"), however that's a responsive check rather than pro-active. In your situation, you may find creating a behavior would be beneficial. The behavior would run the checks on the beforeDelete callback and you can restrict it at that level instead of a database. Richard On Tue, Apr 14, 2009 at 3:41 PM, qwanta wrote: > > In the case where If I have a one to many relationship like Authors- > >Books and I would like to delete an author - but only if this author > has no books - is there a buiilt-in way to check? > > I find that I run into this situation a lot (every time a table has a > foreign key), and at the moment manually write a function in the model > to check this. eg. for the Books model a method with the author_id as > parameter that returns true if the author has books, false otherwise. > But it seems like cakephp should be able to check this based on the > model relationships, so is there something built-in I am missing? > > Thanks > > > --~--~-~--~~~---~--~~ 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 hosting service do you use?
I have had a dedicated server with Liquid Web (http:// www.liquidweb.com/?RID=bmchosting) for over two years now and I have been extremely impressed with both server performance and customer support. They do all types of hosting too, not just dedicated, and they're prices are not bad either. :) On Mar 9, 6:13 pm, "Dave Maharaj :: WidePixels.com" wrote: > Can I get some feedback on the hosting companies people use to host cake > sites? I am using hostmonster and when I setup ACL it will not run. I get > SQL Error: 1104: The SELECT would examine more than MAX_JOIN_SIZE rows; > check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if > the SELECT is okay [CORE/cake/libs/model/datasources/dbo_source.php, line > 514] > > Query: SELECT `Aco`.`id`, `Aco`.`parent_id`, `Aco`.`model`, > `Aco`.`foreign_key`, `Aco`.`alias` FROM `acos` AS `Aco` LEFT JOIN `acos` AS > `Aco0` ON (`Aco0`.`alias` = 'controllers'). > > I checked the MAX_JOIN_SIZE they have and it is 100,000,000 which I can not > image why it would not work but for some reason its not working for me. > > I contacted hostmonster and their response for increasing MAX_JOIN_SIZE is: > > Dear Customer, > > Thanks for contacting us. > > We apologize for the trouble you've been having, but we are unable to raise > MAX_JOIN_SIZE. If it needs joins that big then it won't work on our servers > unfortunately. > > Thanks, > > JM > > Level 2 Scripting Specialist > > hostmonster.com > > 866.573.4678 > > Can someone let me know how to fix this error or suggest a hosting company > that you use and have the AUTH ACL setup running on? > > Thanks > > Dave --~--~-~--~~~---~--~~ 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 see anything
Did you set "AllowOverrides" to "All" in your http.conf? On Tue, Apr 14, 2009 at 10:42 AM, mcphisto wrote: > > Hi, > I just baked my first application on cake 1.2. > With the bake console I did all the configuration. So now I've on the > first page this: Sweet, "App" got Baked by CakePHP!. > The problem is that if I go 127.0.0.1/categories, it doesn't find > nothing. > I configured gverything so that my app is on c:\program fils\easy php > 3.0\www\app. > Why I cant get the views pages? > > Thank you. > > > > -- - "You can't reason people out of a position they didn't use reason to get into." Christian Leskowsky --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
can't see anything
Hi, I just baked my first application on cake 1.2. With the bake console I did all the configuration. So now I've on the first page this: Sweet, "App" got Baked by CakePHP!. The problem is that if I go 127.0.0.1/categories, it doesn't find nothing. I configured gverything so that my app is on c:\program fils\easy php 3.0\www\app. Why I cant get the views pages? Thank you. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
easy way to find out if onetomany record is used (before deleting it)?
In the case where If I have a one to many relationship like Authors- >Books and I would like to delete an author - but only if this author has no books - is there a buiilt-in way to check? I find that I run into this situation a lot (every time a table has a foreign key), and at the moment manually write a function in the model to check this. eg. for the Books model a method with the author_id as parameter that returns true if the author has books, false otherwise. But it seems like cakephp should be able to check this based on the model relationships, so is there something built-in I am missing? Thanks --~--~-~--~~~---~--~~ 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: Help for ajax update form field
Use $ajax->observeField method of ajax helper. Here is an example: observeField("AlbumNametext",array ('url'=>'checkAlbumName','update'=>'albumNameMsg','loading'=>"Element.show ('loaderIDCheck')",'loaded'=>"Element.hide ('loaderIDCheck')",'before'=> "if($('AlbumNametext').value == ''){ $('albumNameMsg').innerHTML='Please enter album name'; $('albumNameMsg').style.color='red'; return false; } else { $('albumNameMsg').innerHTML=''; }")); ?> On Apr 14, 6:19 pm, "Dr.Dran" wrote: > Hi! > > I'm a newbe, I try to make my new application with cake, there is a > simple shopping cart. > > I have in particular two field that one is the quantoty and one is the > price. > > My problem is that I want when i fill the quantity field the price > field change his value that was a simple product of the price for the > quantity... > > I found in ajax inhttp://ajaxtags.sourceforge.netth function Update > Field that seems do what I need: "Updates one or more form field > values based on response to text entered in another field" > > There is the same thing in cake ajaxhelper? There is some examples? > > Best regards > > Franco Tampieri > > P.S. Excuse me for my bad english :P --~--~-~--~~~---~--~~ 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.)?
TextMate when at home... Notepad++ (Portable) when on the road. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
"$javascript->codeBlock" Question
How is the right way? $script = $javascript->event($id, "mouseover", "legenda('". $texto."')", false). $javascript->event($id, "mouseout", "UnTip()", false); echo $javascript->codeBlock($script,null); --~--~-~--~~~---~--~~ 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.)?
EditPlus. Dreamweaver (rarely, for designing purpose only). --~--~-~--~~~---~--~~ 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.)?
Eclipse with PhpEclipse http://www.phpeclipse.com/ On 14 abr, 06:06, BlueC wrote: > Agreed, Komodo Edit is just perfect in my eyes. It hits the sweet spot > between editor and full blown IDE. I don't need an IDE but I do need > advanced editing capabilities and Komodo Edit hits the nail on the > head. I edit under Linux and the only other real (free) alternative > seems to be Eclipse which I thoroughly dislike. > > In addition to your list, it's free and the cakePHP addon is awesome > (although needs a few tweeks). > > C > > On Apr 14, 8:23 am, refused wrote: > > > Another vote for Komodo IDE/Edit > > > - Fast (I've tried a lot and it's definitely up there) > > - Cross platform > > - Doesn't use java (nothing against java, just most apps seem sluggish > > on any system I've used) > > - Great addon/macro/snippet system (addons similar to Firefox) > > > That said, will be interested to see how well E-Texteditor runs on > > Linux when that gets a released --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Help for ajax update form field
Hi! I'm a newbe, I try to make my new application with cake, there is a simple shopping cart. I have in particular two field that one is the quantoty and one is the price. My problem is that I want when i fill the quantity field the price field change his value that was a simple product of the price for the quantity... I found in ajax in http://ajaxtags.sourceforge.net th function Update Field that seems do what I need: "Updates one or more form field values based on response to text entered in another field" There is the same thing in cake ajaxhelper? There is some examples? Best regards Franco Tampieri P.S. Excuse me for my bad english :P --~--~-~--~~~---~--~~ 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: Multiple login page using Auth
Im not sure what exactly do you mean, but i think i had a semilar problem. I need a login page where the email adress is checked in a first step. if the adress exists in the user table, promt for a password and log the user in. if not, show a register form. for this i made a lot of handwork and only the last page, where all informations for login are complete i used the methods from the auth component. --~--~-~--~~~---~--~~ 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.)?
Agreed, Komodo Edit is just perfect in my eyes. It hits the sweet spot between editor and full blown IDE. I don't need an IDE but I do need advanced editing capabilities and Komodo Edit hits the nail on the head. I edit under Linux and the only other real (free) alternative seems to be Eclipse which I thoroughly dislike. In addition to your list, it's free and the cakePHP addon is awesome (although needs a few tweeks). C On Apr 14, 8:23 am, refused wrote: > Another vote for Komodo IDE/Edit > > - Fast (I've tried a lot and it's definitely up there) > - Cross platform > - Doesn't use java (nothing against java, just most apps seem sluggish > on any system I've used) > - Great addon/macro/snippet system (addons similar to Firefox) > > That said, will be interested to see how well E-Texteditor runs on > Linux when that gets a released --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Help: ckaek 1.2 --> vews ajax
Hi! I'm a newbe, I try to make my new application with cake, there is a simple shopping cart. I have in particular two field that one is the quantoty and one is the price. My problem is that I want when i fill the quantity field the price field change his value that was a simple product of the price for the quantity... I found in ajax in http://ajaxtags.sourceforge.net th function Update Field that seems do what I need: "Updates one or more form field values based on response to text entered in another field" There is the same thing in cake ajaxhelper? There is some examples? Best regards Franco Tampieri P.S. Excuse me for my bad english :P --~--~-~--~~~---~--~~ 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.)?
textwrangler On Sat, Feb 28, 2009 at 11:14 PM, adam wrote: > > I'm using Eclipse with PDT, but Dreamweaver for making layouts. > > > --~--~-~--~~~---~--~~ 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 config for table with no ID
Well i think you should have no problem using $this->model->find() method even if you don't have a PK field as per cakephp 1.2.x (not sure about previous versions). If still don't work try $this->model- >primaryKey="fieldname" to make virtual primary key and see what happen. On Apr 10, 7:45 am, mattalexx wrote: > Hi > > I am trying to access a database table that was built without a > primary key (I know). How would I go about this in CakePHP. Is it > possible or do I have to just use Model::query all the time? --~--~-~--~~~---~--~~ 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: problem with Cakephp session in Jake
I have the same problem, I hope that Jake again be developed --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
CakeSession error with memcache
Hi I try to use memcache for save sessions in a CakePHP application. I install memcache,all works fine also the php sessions. Now in my CakePHP application I set in core.php this: Configure::write('Session.save', 'php'); Now I try to use the Session component in my application but I get these errors in SessionComponent Object ( [__active] => 1 [__started] => 1 [__bare] => 0 [valid] => 1 [error] => Array ( [2] => Config doesn't exist [1] => Session is valid ) ... ) And the session doesn't work Can someone help me? Is it something wrong in configuration? Many Thanks --~--~-~--~~~---~--~~ 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: Using ajax without helper
You will have to write out all the needed Javascript yourself. Stick what you need in script tags in your view. On Apr 13, 11:45 am, josue crispim wrote: > Hi > > How to use ajax without helper of cakephp ? > > thanks --~--~-~--~~~---~--~~ 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: Extending the time helper
You can copy the helper from cake/liibs/views/helpers into app/views/ helpers. Then make what ever changes you want. This keeps the core intact. On Apr 13, 4:04 pm, Miles J wrote: > Whats the best and easiest way to do this? Currently the time helper > is in 24 hour format, I want 12. Should I just create my own time > helper in the helpers folder and copy and paste the original code? Or > is there another way? > > Also when dealing with timezones, I pass the -6, +4, 0, etc GMT values > correct? --~--~-~--~~~---~--~~ 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: Prefix routing behavior is not OK
I found this article to be usefull regarding prefix routing: http://www.pagebakers.nl/2008/12/04/cakephp-router-and-prefixes/ It shows how you can get the right urls for paginator, links and forms using cake's prefix functionality. On Apr 12, 11:05 pm, Hazem Mohamed wrote: > Hi, > I'm using cake for a while and have problems with prefix routing in > every project I created. Its behavior is not what it should be. The > following issues happened to me: > * setting any other named params the prefix becomes one of the in the > format $prefix:1. This makes some problem with pagination and I made > seriously bad workarounds to get it working. > * when I tried to make redirects and URLs to a plugin it does the same > thing and the prefix became a named parameter. > > I tried many workarounds and changed many times and nothing changed. I > tried to set prefix in the url array for different functions, in > pagination urls everything failed to work with me. > > Do any one has a solution before sending a ticket in trac. Thanks in > advance ans sorry for my poor English --~--~-~--~~~---~--~~ 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: Preferred way to delete with conditions?
Looking at the signature for `deleteAll` should answer your question: > function deleteAll($conditions, $cascade = true, $callbacks = false) In the version of cake I'm using, it does say in the comments that $callbacks is "not being used", but a quick view of the code shows that it is. If you enable both $cascade and $callbacks you should get the effect you're looking for. hth grigri On Apr 14, 12:28 pm, Martin Westin wrote: > Hi, > I frequently need to verify that deleting a record is allowed. I was > wondering how others handle this kind of "conditional delete"? > > When finding I can very simply add on an extra condition to check that > some field matches my requirement. Using the common Blog-analogy it > might be finding only published posts (published = 1) or similar > "static" requirement. > > For deletes I have nothing similar to check, say, published = 0 so > that I don't delete published posts for example. It might be to > disallow deleting of users with admin privileges and a number of other > fairly common cases. > > A good example would be a "Folder hasMany dependent File" (these are > reserved words but as a meta-example). When deleting a Folder the user > doing the deleting needs write access to the folder and each file > needs to "beforeDelete" each physical file before deleting the > database record. > > deleteAll will not work here (afaik) since I need the callbacks to > fire on the dependent model and I need a condition on the primary > model. > > I first have to "find" to verify if the delete can take place, which > is extra queries (and for-loops). Is there an option better than using > find('list'), foreach and del ? > > /Martin --~--~-~--~~~---~--~~ 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: Contain and extra sql queries
Well, it's not containable's job to do caching. have a look at Model->cacheQueries. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Preferred way to delete with conditions?
Hi, I frequently need to verify that deleting a record is allowed. I was wondering how others handle this kind of "conditional delete"? When finding I can very simply add on an extra condition to check that some field matches my requirement. Using the common Blog-analogy it might be finding only published posts (published = 1) or similar "static" requirement. For deletes I have nothing similar to check, say, published = 0 so that I don't delete published posts for example. It might be to disallow deleting of users with admin privileges and a number of other fairly common cases. A good example would be a "Folder hasMany dependent File" (these are reserved words but as a meta-example). When deleting a Folder the user doing the deleting needs write access to the folder and each file needs to "beforeDelete" each physical file before deleting the database record. deleteAll will not work here (afaik) since I need the callbacks to fire on the dependent model and I need a condition on the primary model. I first have to "find" to verify if the delete can take place, which is extra queries (and for-loops). Is there an option better than using find('list'), foreach and del ? /Martin --~--~-~--~~~---~--~~ 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: User registration - Email verification using tokens
I use a similar method to Edward's (or so i imagine after a quick glance). I have the "ticketing" side of things put into a general-purpose model: http://bin.cakephp.org/saved/44956 In your case you would need the following logical steps. Where are you getting into trouble? - Display registration form - Save new User with a flag to mark it as disabled. (any logins and other features should require an enabled user) - Create an activation ticket and send the url to the user's email. - Accept activations where you verify the ticket (and delete it) and enable the relevant user. Using "my" Ticket model, I create a new ticket like this: $ticket = $this->Ticket->setTicket($this->params['controller'], $theUser['User']['email']); Then I email this link: $link = 'http://'.$_SERVER['SERVER_NAME'].'/'.$this->params ['controller'].'/activate/'.$ticket; In the "activate" action I then fetch the ticket and enable the user. function activate($hash = null) { $email = $this->Ticket->getTicket($this->params['controller'], $hash) ... $authUser = $this->User->findByEmail($email); if ( is_array($authUser) ) { // enable the user here }else{ // oups no user, better delete the ticket since this should not be able to happen $this->Ticket->drop($hash); } } On Apr 13, 9:43 pm, niki wrote: > hello > > I have been trying out a way to send an email to the new user with a > token on a submitting the user registration form and finally saving > the user into the database when the token has been exicuted. > > This is excatly like the bakery.cakephp.org user registration system. > So far the closest tutorial/code snippet I have found for the same is > > http://edwardawebb.com/programming/php-programming/cakephp/reset-lost... > > and a slightly outdated tutorial for the same in the bakery. I have > been trying to modify them for my needs but have been unsuccessful so > far. Any help or guidance with the same essp. in terms of tutorials or > a basic way to achieve the goal will be great help. > > thanks --~--~-~--~~~---~--~~ 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 Lazy Load -- Or How to prevent the controller open a database connection automatically.
You define dontUseModels, but you are checking for dontUserModels, are you sure this code is working as expected? :) Cheers, Faifas 2009/4/14 Dérico Filho > > I solved. > > I put this in one of application controllers... although it can be put > also in app_controller.php >var $dontUseModels = Array( >'method1' => true, >'method2' => true, >... >); > >function constructClasses() { >if(isset($this->dontUserModels[$this->action])){ >parent::constructClasses(); >} >return true; >} > >function beforeFilter(){ >if(isset($this->dontUserModels[$this->action])){ >parent::beforeFilter(); > } >} > > On Apr 13, 7:42 pm, Dérico Filho wrote: > > Hi, > > > > I am a very particular situation here. I have a controller which 2 > > methods do not connect into any database, they are as simple as > > displaying a view. > > > > However, I noticed, every time a open these methods, the CakePHP open > > a database connection, which is useless, because, as I told, these do > > nothing. > > > > What should I do to prevent CakePHP opening this useless database > > connection? > > > > I thought hacking into controller.php... But is there any cleaner > > solution? > > > > []s > > Dérico Filho > > > --~--~-~--~~~---~--~~ 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: Using home.ctp
You can simply create a new controller/model and parse your data there. Create a view so that everything would be ready. You should also take a look at routes.php which can be found at cake/app/core/routes.php and change routing to your desired place. Hope you find this handy, Faifas On Tue, Apr 14, 2009 at 08:14, deepesh gairola wrote: > > hi friends , > I want to use home.ctp for a default page to avoid > adding new parameter in the URL . > In home.ctp i wan to show some values from database . What options do > i have ?? > > Regards > deepesh gairola > > > --~--~-~--~~~---~--~~ 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: Dependent in Associations is not working.
How do you delete the user? You have to set the cascade parameter of the del funtion to true. Otherwise related blog posts won't be deleted. http://book.cakephp.org/view/516/Deleting-Data --~--~-~--~~~---~--~~ 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: Query question
You could possibly do a UNION query? If you need to know which table they came from, add a hard-coded value to the field list ('TableA' as which_table). SELECT id, firstname, lastname FROM tableA where email = 'a...@b.com' UNION SELECT id, firstname, lastname FROM tableB where email = 'a...@b.com' It's the same as doing two queries, but joining the result set might be faster in the DBMS than joining two arrays with PHP; I've not checked to see. Richard On Tue, Apr 14, 2009 at 4:47 AM, Dave Maharaj :: WidePixels.com < d...@widepixels.com> wrote: > I have come into a situation where I need to find something that will be > in either TableA or TableB. Is there an easy way to do this or do i need to > query TableA if no results query TableB? > > thanks, > > Dave > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Contain and extra sql queries
Hi ! i have a little problem with de containable behaviour. In the sql log, i see that cakephp is doing too many queries than it should do : 13 SELECT `Chef`.`id`, `Chef`.`name`, `Chef`.`prenom` FROM `ressources` AS `Chef` WHERE `Chef`.`id` = 11 1 0 14 SELECT `Chef`.`id`, `Chef`.`name`, `Chef`.`prenom` FROM `ressources` AS `Chef` WHERE `Chef`.`id` = 81 1 0 15 SELECT `Chef`.`id`, `Chef`.`name`, `Chef`.`prenom` FROM `ressources` AS `Chef` WHERE `Chef`.`id` = 81 1 0 16 SELECT `Chef`.`id`, `Chef`.`name`, `Chef`.`prenom` FROM `ressources` AS `Chef` WHERE `Chef`.`id` = 11 1 0 17 SELECT `Chef`.`id`, `Chef`.`name`, `Chef`.`prenom` FROM `ressources` AS `Chef` WHERE `Chef`.`id` = 81 1 0 18 SELECT `Chef`.`id`, `Chef`.`name`, `Chef`.`prenom` FROM `ressources` AS `Chef` WHERE `Chef`.`id` = 81 1 0 19 SELECT `Chef`.`id`, `Chef`.`name`, `Chef`.`prenom` FROM `ressources` AS `Chef` WHERE `Chef`.`id` = 81 1 0 20 SELECT `Chef`.`id`, `Chef`.`name`, `Chef`.`prenom` FROM `ressources` AS `Chef` WHERE `Chef`.`id` = 11 1 0 21 SELECT `Chef`.`id`, `Chef`.`name`, `Chef`.`prenom` FROM `ressources` AS `Chef` WHERE `Chef`.`id` = 81 1 0 22 SELECT `Chef`.`id`, `Chef`.`name`, `Chef`.`prenom` FROM `ressources` AS `Chef` WHERE `Chef`.`id` = 81 1 0 23 SELECT `Chef`.`id`, `Chef`.`name`, `Chef`.`prenom` FROM `ressources` AS `Chef` WHERE `Chef`.`id` = 8 this happens when a use : 'contain' => array('Chef' => array => fields('id', 'name', 'prenom')) Is there any way to cache the first result, so cake won't look for a user it already fetched ? thanks ! --~--~-~--~~~---~--~~ 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.)?
Something I've not seen in the list that I use, and that's Aptana Studio, which is built on top of Eclipse. On Tue, Apr 14, 2009 at 8:23 AM, refused wrote: > > Another vote for Komodo IDE/Edit > > - Fast (I've tried a lot and it's definitely up there) > - Cross platform > - Doesn't use java (nothing against java, just most apps seem sluggish > on any system I've used) > - Great addon/macro/snippet system (addons similar to Firefox) > > That said, will be interested to see how well E-Texteditor runs on > Linux when that gets a released > > > --~--~-~--~~~---~--~~ 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: Getting kicked out by auth when displaying blobs
You should use the MediaView class (see API documentation) to send or display the file data. And files should not be stored in a database in the case of a web app. --~--~-~--~~~---~--~~ 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.)?
Another vote for Komodo IDE/Edit - Fast (I've tried a lot and it's definitely up there) - Cross platform - Doesn't use java (nothing against java, just most apps seem sluggish on any system I've used) - Great addon/macro/snippet system (addons similar to Firefox) That said, will be interested to see how well E-Texteditor runs on Linux when that gets a released --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Dependent in Associations is not working.
It is user model: class User extends AppModel { var $name = 'User'; var $primaryKey = 'userId'; var $displayField = 'userName'; var $hasMany = array( 'Blog' => array( 'className' => 'Blog', 'foreignKey' => 'blogId', 'dependent' => true, ) ); } and it is my blog model: class Blog extends AppModel { var $name = 'Blog'; var $primaryKey = 'blogId'; var $displayField = 'blogTitle'; var $belongsTo = array( 'Blogcategory' => array( 'className' => 'Blogcategory', 'foreignKey' => 'blogCategoryId', 'fields' => 'blogCategoryName', ), 'User' => array( 'className' => 'User', 'foreignKey' => 'userId', 'fields' => 'displayName', ) ); } If anyone delete any user, all the blog posts by the very user should be deleted. Therefore I have set " 'dependent' => true, " in user model. But when I am deleting any user it is not deleting the blogs of the very user. What is the prob. in my code? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---