how to check the form field change ---Cake-Php

2007-08-12 Thread sharath
Hii to all, I'm using cake php for editorial process page. In that page we have several field, in which user can edit those. After this he can click to next or prev button to move either way to edit another page. Suppose if he click on next , it will show a alert message "Do you want to save the

Re: Fatal error: ConnectionManager::getDataSource - Non-existent data source in /var/www/cake/cake/libs/model/connection_manager.php on line 110

2007-08-12 Thread Samuel DeVore
As a heads up make sure you avoid reserved words in php as well as cake On 8/12/07, Muhammad Ishaq <[EMAIL PROTECTED]> wrote: > Thanks a lot Geoff, It solved the problem... :) Everything works fine now... > > CakePHP is really MVC taken to the extreme... > > > On 8/13/07, Geoff Ford <[EMAIL PROTE

hasMany results in multiple queries

2007-08-12 Thread Kusok
Hi, I have a DB structure, where I have a channel and media (many files), that belong to the channel. So what I do is add a hasMany relation like so var $hasMany = array('Media' => array('ClassName' => 'Media',

Re: Fatal error: ConnectionManager::getDataSource - Non-existent data source in /var/www/cake/cake/libs/model/connection_manager.php on line 110

2007-08-12 Thread Muhammad Ishaq
Thanks a lot Geoff, It solved the problem... :) Everything works fine now... CakePHP is really MVC taken to the extreme... On 8/13/07, Geoff Ford <[EMAIL PROTECTED]> wrote: > > > Looking at the screenshot - it appears that you are using a Model > called File. There is a core class called File so

Re: What's the view cache story in cake 1.2?

2007-08-12 Thread Geoff Ford
Does the cache folder have write permissions? Geoff -- http://lemoncake.wordpress.com On Aug 13, 9:28 am, Kimble <[EMAIL PROTECTED]> wrote: > On 10 Aug, 17:56, "Feris Thia" <[EMAIL PROTECTED]> wrote: > > > > > Have you added : > > > var $cacheAction = array( > > 'Your action/view URL' => se

Re: Form helper issue

2007-08-12 Thread Grant Cox
It's intentional, for convenience. The simplest solution would be to use $this- >input('General.island_param') and access the submitted data in $this- >data['General']['island_param']. It doesn't matter that "General" isn't a model. On Aug 13, 9:34 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>

Re: Advice on Complex Model setup

2007-08-12 Thread CakeSpork
Oh wait! Sorry, haha, this realization took way too long. Thanks a lot, it's ofcourse not an ingredient that is created everytime, just the association! On 13 aug, 02:04, CakeSpork <[EMAIL PROTECTED]> wrote: > Thanks for the reaction. > > Yeah, I'm using 1.2. > > The problem with that approach is

Re: Synchronization?

2007-08-12 Thread Langdon Stevenson
No worries. Knowing what to search for is often half the battle :-) Langdon Soulcatcher wrote: > Oh, ok, thank you. Didn't try to search using method name :) > > On Aug 9, 9:16 pm, Langdon Stevenson <[EMAIL PROTECTED]> wrote: >> Woops. That should have been: >> >> If you search the group for

Re: Advice on Complex Model setup

2007-08-12 Thread CakeSpork
Thanks for the reaction. Yeah, I'm using 1.2. The problem with that approach is that for every quantity a new ingredient is created, right? Or did I misunderstand? I will want to link the ingredients to things like stores later, if there is an ingedrient for every quantity, this will get terribl

Re: Synchronization?

2007-08-12 Thread Soulcatcher
Oh, ok, thank you. Didn't try to search using method name :) On Aug 9, 9:16 pm, Langdon Stevenson <[EMAIL PROTECTED]> wrote: > Woops. That should have been: > > If you search the group for "getLastInsertId" you should find the > details (expressed much better than I have here) > > Regards, > Lan

Re: What's the view cache story in cake 1.2?

2007-08-12 Thread Kimble
On 10 Aug, 17:56, "Feris Thia" <[EMAIL PROTECTED]> wrote: > Have you added : > > var $cacheAction = array( > 'Your action/view URL' => secondsofcache > ); > > in your controller ? > > for example : > > var $cacheAction = array( > 'cat/' => 21600 > ); > > Regards, > > Fe

Re: Advice on Complex Model setup

2007-08-12 Thread Marcin Domanski aka kabturek
are you using 1.2 ? search a little for the 'with' key in the association properties of a HABTM - you can define a model for the join table. and then you have a join table with id , ingredient_id, recipe_id , quantity. i would do it that way if i understood you right :) On Aug 13, 1:14 am, CakeS

Form helper issue

2007-08-12 Thread [EMAIL PROTECTED]
If I do echo $form->input('Model.id') and then echo $form- >input('island_param'), Cake is using Model to create the second one's attribute tags and assigning $this->data['Model']['island_param'] in the controller.why doesn't it put it in $this- >data['island_param']? Is this supposed to be a

Advice on Complex Model setup

2007-08-12 Thread CakeSpork
At least, for *me* it's complex. Here's the situation: There's Users, Drinks, Recipes and Ingredients. The idea is probably obvious: Users get to add Drinks and Recipes (-which I continuously misspell as Recipies, suggestion on that problem are welcome too) for those Drinks with Ingredients. My i

Re: Fatal error: ConnectionManager::getDataSource - Non-existent data source in /var/www/cake/cake/libs/model/connection_manager.php on line 110

2007-08-12 Thread Geoff Ford
Looking at the screenshot - it appears that you are using a Model called File. There is a core class called File so try changing the name of your model. Geoff -- http://lemoncake.wordpress.com On Aug 13, 3:51 am, "Muhammad Ishaq" <[EMAIL PROTECTED]> wrote: > Sorry, the lines that had displayed

Advice on Complex Model setup

2007-08-12 Thread CakeSpork
Well, it's complex in *my* eyes. This is the deal: There's Users, Drinks, Recipes and Ingredients. The goal is probably already obvious: Users will be able to submit Drinks, Recipes (-which I continually misspell as recipies, advice on that is welcome too) and recipies will have ingedrients. Th

Re: Default Order in Module

2007-08-12 Thread Aurelijus Valeiša
Hi, in my opinion to do that you should edit 1745 line of file model.php in cake core, but I wouldn't do that ;) So there are two another options - create your own function, e.g.: function myGenerateList($conditions = null, $order = 'Amentity.title ASC', $limit = nul

Re: error in bake.php

2007-08-12 Thread Chris Hartjes
Looks like your database connection isn't working. On 8/12/07, yudhi prasetyo <[EMAIL PROTECTED]> wrote: > > Dear's all > > when i try learn cake with script bake.php ,i've got some trouble in it > > here the problem, > > C:\xampp\htdocs\kerjaan\cake\app>php ..\cake\scripts\bake.php > > ___ __

Re: Fatal error: ConnectionManager::getDataSource - Non-existent data source in /var/www/cake/cake/libs/model/connection_manager.php on line 110

2007-08-12 Thread Muhammad Ishaq
Sorry, the lines that had displayed notices from cake in the above message have become a mess, I tried to copy them through Kate, but it still copies a lot of data... On 8/12/07, Muhammad Ishaq <[EMAIL PROTECTED]> wrote: > > Hi, > > I just installed cake (1.2.x.x) yesterday and have been

Default Order in Module

2007-08-12 Thread 1Marc
Can I setup the module to sort by a field by default? For instance.. in the module i would setup something like, $order = "Amenity.title ASC" .. or something. Instead of always doing this: generateList(null, 'Amenity.title ASC') and by default generateList() would just grab the data by my order

Re: Active Menu Item

2007-08-12 Thread francky06l
That could help you : http://feeds.feedburner.com/~r/thinkingphp/~3/131756472/ On Aug 12, 6:04 pm, nitifixis <[EMAIL PROTECTED]> wrote: > Hi! > > I have recently started looking into Cake and have some questions. I > have a menu in the default layout of my Cake app and I'd like to find > out how

Re: Aliasing a model name in a HABTM association

2007-08-12 Thread David
OK, so I think I found a workaround: I created a second model (identical to the Merchants model) called RelatedMerchants (setting $useTable to 'merchants'). This then allows you to use the code: var $hasAndBelongsToMany = array('RelatedMerchant'=>array('classname'=>'Merchant',

Active Menu Item

2007-08-12 Thread nitifixis
Hi! I have recently started looking into Cake and have some questions. I have a menu in the default layout of my Cake app and I'd like to find out how to know which one of its items is active. Do I have to move the menu into the views ? Thanx in advance --~--~-~--~~~--

Re: N/A option in select (dropdown) element

2007-08-12 Thread Zoltan
Just noticed the $showEmpty option doesn't seem to be in 1.2's generateList (model.php) - anyone know of an equivalent? Zoltan On Jul 24, 6:09 pm, MonkeyGirl <[EMAIL PROTECTED]> wrote: > > function select($fieldName, $options = array(), $selected = null, > > $attributes = array(), $showEmpty = '

Re: HABTM Does not select extra table :(

2007-08-12 Thread Mech7
Anybody has an idea ? :( --~--~-~--~~~---~--~~ 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 PROTECTE

error in bake.php

2007-08-12 Thread yudhi prasetyo
Dear's all when i try learn cake with script bake.php ,i've got some trouble in it here the problem, C:\xampp\htdocs\kerjaan\cake\app>php ..\cake\scripts\bake.php ___ __ _ _ ___ __ _ _ __ __ __ _ _ ___ ||__| |_/ |__ |__] |__| |__]|__] |__| |_/ |__ |___ | | | \_ |

Error message wrong line...

2007-08-12 Thread Mike Digital Egg
Hi, Has anyone come across error messages which say there is a problem with the wrong line? I am getting the following error message: Fatal error: Call to a member function on a non-object in /path/app/ app_controller.php on line 65 When I look at line 65 in app_controller.php it is just the cl

Re: RIGHT JOIN

2007-08-12 Thread Olexandr Melnyk
Why do you need it? Any right join can be replaced with a left join. You can use "find" on associated model to achieve a right join. Eg, instead of: $this->Model1->findAll("Model1.field = 'value'") you can use: $this->Model2->findAll("Model1.field = 'value'") assuming that the two models are a

Data History & Pagination

2007-08-12 Thread Feris Thia
Hi, I have a model which transaction record per month. Underlying database is MySQL with DDL sql as below CREATE TABLE `estimations` ( `id` int(11) NOT NULL auto_increment, `customer_id` varchar(200) NOT NULL, `item_id` varchar(200) NOT NULL, `amount` int(11) NOT NULL, `month` tinyint(

Re: How I created a global record search

2007-08-12 Thread ianh
+1 to zend_search_lucene over rolling your own global search (unless you have a small number of db tables). There is a tutorial on the Bakery (http://bakery.cakephp.org/articles/view/integrating-zend- framework-lucene-with-your-cake-application) that helps getting it into the system. As an anecdot

RIGHT JOIN

2007-08-12 Thread Aurelijus Valeiša
Hey folks, is there any way to do RIGHT JOIN in CakePHP ? I mean without using $this->ModelName->query("SQL QUERY"); Thanks for suggestions. -- Aurelijus Valeiša --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake

Re: Filtering using manually entered values

2007-08-12 Thread kabturek
On Aug 10, 6:17 pm, mussond <[EMAIL PROTECTED]> wrote: > Hey, thanks for the link :) but I'm not using 1.2 :( only named params are 1.2 specific there > The project I'm evolved with uses 1.1, hence my use of query in the > 1st place. so there wasn't a findAll in 1.1 ? ;) It's not an excuse:)

Re: Help visualising relationships

2007-08-12 Thread kabturek
" so to avoid having to redefine the relationship " redefine ? what are you talking about ? Areas hasMany Lettings when the user deletes the letting then do not delete it from the db - just soft delete it. You got to provide more details... greets, Marcin Domanski aka kabturek On Aug 10, 6:31 p

Re: problem with validator cakephp 1.2

2007-08-12 Thread kabturek
Where do you set the data for the model ? like $this->Model->create($this->data); OR $this->Model->set($this->data) OR or $this->Model->save($this->data) ? also use the new validation approach in 1.2 http://bakery.cakephp.org/articles/view/multiple-rules-of-validation-per-field-in-cakephp-1-2 an

Re: $this->Model->AssociatedModel

2007-08-12 Thread kabturek
$this->User->Post->find(array('Post.user_id' => $user['User']['id']); it would search in all posts that have the user_id set to $user['User'] ['id']. its the same as when you have Post in uses $this->Post->find(array('Post.user_id' => $user['User']['id']); You will always learn new things cause c

Re: How I created a global record search

2007-08-12 Thread kabturek
That will be a lot of findAlls... and LIKE is a db killer;) Also you would like to set recursive to -1 when searching. This is a little out of scope but some index optimization is a must in your solution http://www.databasejournal.com/features/mysql/article.php/1382791 I've did simple searches th

othAuth, nao mode?

2007-08-12 Thread chewie124
Can anybody point me in the direction where I can read about othAuth's 'nao' mode, where a user can belong to multiple groups? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to th