Re: find('count',...) returns false

2009-10-11 Thread Dr. Loboto
Set debug to at least 1 and you'll see all errors. On Oct 11, 5:08 pm, rrd wrote: > It should be written down in the cookbook and in the api. > > If so is tehre any way to get the sql error message? I need to know > what caused the query error. --~--~-~--~~~---~--~---

Re: Cache question

2009-10-11 Thread Dr. Loboto
Call $this->disableCache(); for sensitive actions. Or call it always when logged in. On Oct 11, 11:33 pm, "Dave Maharaj :: WidePixels.com" wrote: > I have an element that when the user logs in says Welcome Test Account One > (being my dummy user's name) > > I logout and login as a different user

Re: Edits being Added for form with associated model

2009-10-11 Thread Dr. Loboto
Most probably your $id is empty as you did not passed it to action. On Oct 12, 8:26 am, ajoberstar wrote: > So I've got a form that's got fields for both the model (Album) and > its associated (hasMany) model (Track).  Anytime I use the edit form > it does an add.  I'm assuming this is an issue

Re: validate - unique - error message

2009-10-11 Thread Marcelo Andrade
On Sun, Oct 11, 2009 at 11:03 AM, Melanie Sommer wrote: > > Hello, > > I am using code from the bakery tutorials to validate my form elements > for unique records. > http://bakery.cakephp.org/articles/view/checking-for-duplicate-records-unique-record > (I am using the code of comment no. 5 as I n

need help in autocomplete

2009-10-11 Thread adilraufk...@gmail.com
I am having problem in autocomplete. I downloaded the component, added to controller, added js files etc. it started working. used it in Users controller on user register form to suggest firstname that was in users table, it worked fine. But i have to use it on statename (statesname is a field i

Clean Pagination

2009-10-11 Thread Dave Maharaj :: WidePixels.com
I hate all the pagination params in the controller so I did this To paginate all active users for an example controller: $this->paginate['User'] = $this->User->userPagination(); $this->set('users', $this->paginate('User', array('User.id' => $this->User->getActiveUsers(; model: Build

Re: Difference into Controller::$data and Model::$data

2009-10-11 Thread robust solution
for the controller --- by default, $this->data means the (POST)ed data array, so every FORM field having a name = data[anything here][anything there] will be handled by $this->data array inside the controller... otherwise (in case the name of the FORM field is not data[...]), i

Custom Route + Param breaks Pagination

2009-10-11 Thread double07
Hi All, I've got a custom route which points to a sub-controller: Router::connect('/happyvalley/news/:action/*', array('controller' => 'happyvalley_news', 'prefix' => 'happyvalley', 'happyvalley' => true)); It all works fairly well except for when I add a custom parameter, in this case 'q' (whic

How I can integrate cakephp into Joomla.

2009-10-11 Thread arif hossen
Dear All, Please help me. How i can integrate cakephp into Joomla . -- Regards, Mohammad Arif Hossen Software Enginner Epsilon Consulting and Development Services(ECDS) www.ecds-tech.com +88 01714355911 --~--~-~--~~~---~--~~ You received this message because you a

Difference into Controller::$data and Model::$data

2009-10-11 Thread AmaReLow
The unique difference is that the model use to save/update/del and the Controller to read for the view? Srry for my english. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send

Edits being Added for form with associated model

2009-10-11 Thread ajoberstar
So I've got a form that's got fields for both the model (Album) and its associated (hasMany) model (Track). Anytime I use the edit form it does an add. I'm assuming this is an issue with how my data is being passed to saveAll() but I can't figure it out (I'm pretty new to CakePHP). Here's what

Validation Media Plugin by David Persson

2009-10-11 Thread Amirul
Hi, I've been trying to use the media plugin and it looks great! The only problem I had was the validation of the file. Every time I put the validation, it will show; Warning (2): preg_match() expects parameter 2 to be string, array given [CORE/cake/libs/validation.php, line 848] Code | Contex

retrieve online status of a user while logged in

2009-10-11 Thread DigitalDude
Hey, I need to figure out a solution for a problem. Let's say I have an app which is controlled bei Auth and ACL, so the user can log in into a system and do stuff. Everyone knows from several social networks or chat clients that when a user is logged in, and one or more friends are online, too,

Re: HABTM pagination issue

2009-10-11 Thread double07
Thanks for pointing me in the right direction. For some reason $this->paginate('RolesUser'); didn't work by itself, but after having the same issue later in the project the solution was: (where News hasandbelongstomany Venue) $this->News->NewsVenue->bindModel(array('belongsTo' => array('News', '

Re: Trouble with installation

2009-10-11 Thread Nigel
Nope. I'm still lost. On Oct 11, 11:01 am, Stinkbug wrote: > You have ever figure out the problem for this.  I'm having similar > problems. > > On Sep 27, 1:20 pm, Nigel wrote: > > > > > I have tried it.  But I will try again.  Probably with a fresh install > > of apache.  I'll try purging eve

save() ignores db warnings ?

2009-10-11 Thread mathaios
I have an ajax actions that saves a model into the db and returns an xml response to the script. After some modifications I wrongly tried to save in a mysql date field a string wrongly formatted. This way I have noticed that doing the usual if($this->model->save()) { success_stuff() }{ failure_st

Re: pageTitle and title_for_layout in CakePHP 1.3 views

2009-10-11 Thread Céryl
The "echo Title_for_layout" can be in the section of your layout. You can then place: set('title', 'YourTitle'); ?> anywhere in the view to have the title changed per view. Personally, I always add an "echo 'MySite | '" just before the title_for_layout so that each view will have a title resembl

Re: how to deal with empty data in index-views (example inside...)

2009-10-11 Thread Céryl
I always do the following in the view. ($data is passed from the controller) Some Title . I doubt there are better ways... The elements one you proposed looks a bit cleaner in the sourcecode I guess, but when you split up your views over all kind of elements, it'll get unmanageble in my opin

how to deal with empty data in index-views (example inside...)

2009-10-11 Thread DigitalDude
Hey, today I was wondering about how I could deal with an index-view where no data is available. The main point I'm trying to demonstrate here is the following scenario: In index-views, commonly we have let's say a table where the data we grab from our tables is displayed. But when a user just r

Delay?

2009-10-11 Thread Dave Maharaj :: WidePixels.com
Not sure if this is even possible. Looked everywhere and tried many different things but still no luck. I am editing an image using jCrop, sumbit the request AJAX and the plan is to have the thumbnail update with the newly edited version. I have it all running fine except when i submit the form d

pageTitle and title_for_layout in CakePHP 1.3 views

2009-10-11 Thread mmalca
There was an elegant way to set page title anywhere in view using CakePHP 1.2 - with $this->pageTitle = 'new title'; This has been removed in cakephp 1.3 in favor of $this->set('title_for_layout', 'page title'); Is there no simple way left to set page title elsewhere in view? Can it be changed/s

RE: Cache question

2009-10-11 Thread Dave Maharaj :: WidePixels.com
Firefox believe it or not. -Original Message- From: euromark (munich) [mailto:dereurom...@googlemail.com] Sent: October-11-09 2:15 PM To: CakePHP Subject: Re: Cache question did you experience that in the almighty crap-explorer IE? On 11 Okt., 18:33, "Dave Maharaj :: WidePixels.com"

Re: Cache question

2009-10-11 Thread euromark (munich)
did you experience that in the almighty crap-explorer IE? On 11 Okt., 18:33, "Dave Maharaj :: WidePixels.com" wrote: > I have an element that when the user logs in says Welcome Test Account One > (being my dummy user's name) > > I logout and login as a different user and it shows Welcome Test A

Cache question

2009-10-11 Thread Dave Maharaj :: WidePixels.com
I have an element that when the user logs in says Welcome Test Account One (being my dummy user's name) I logout and login as a different user and it shows Welcome Test Account One until i hit refresh then it shows Test Account Two I have wrapped the element in a block. Logout destroy sessi

RE: Ajax Update Help

2009-10-11 Thread Dave Maharaj :: WidePixels.com
Something like this: $('#GaragePartAddfrompartlistForm').bind('submit', function() { var queryString = $('#GaragePartAddfrompartlistForm').formSerialize(); $(this).ajaxSubmit({ //befo

validate - unique - error message

2009-10-11 Thread Melanie Sommer
Hello, I am using code from the bakery tutorials to validate my form elements for unique records. http://bakery.cakephp.org/articles/view/checking-for-duplicate-records-unique-record (I am using the code of comment no. 5 as I need to validate for a unique combination of fields) It works fine, bu

Folder issue

2009-10-11 Thread bene83
I have a problem with my app folder. I use MAMP with Mac Os X 10.5 and have all my application under /Applications/MAMP/htdocs/cake/app When I try to bake it, I have all successfull files written but when I try to go to localhost/cake/app/users (for example for user model) and it created me the "n

Re: relations and i18n

2009-10-11 Thread kicaj
I found solutions, but it's very hopeless... $product = $this->Product->find('first', array( 'conditions' => array( 'Product.id' => $id))); $category = $this->Category->find('first', array(

Re: relations and i18n

2009-10-11 Thread kicaj
I found solutions, but it's very hopeless... $product = $this->Product->find('first', array( 'conditions' => array( 'Product.id' => $id))); $category = $this->Category->find('first', array(

Re: relations and i18n

2009-10-11 Thread kicaj
I found solutions, but it's very hopeless... $product = $this->Product->find('first', array( 'conditions' => array( 'Product.id' => $id))); $category = $this->Category->find('first', array(

Re: find('count',...) returns false

2009-10-11 Thread rrd
It should be written down in the cookbook and in the api. If so is tehre any way to get the sql error message? I need to know what caused the query error. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" gro

Re: Ajax Update Help

2009-10-11 Thread hahmadi82
Can anyone please help me with this? hahmadi82 wrote: > > Hi, > > I have a question about how to get a div to update after an ajax form > submission. I have a file index.ctp which displays a list of parts. When > you click on "add part", I use: > > $('a.js-ajax').live('click', function()

Re: Can I have more than 1 user tables and still use acl component to manage rights?

2009-10-11 Thread Vijay Pandey
Thank you very much Dr. Loboto, In fact, I am using Mysql for databases. Now this is clear. thanks a lot for your time and help. Regards, Vijai Pandey On Oct 11, 8:59 am, "Dr. Loboto" wrote: > If you use MySQL, even millions of records in table is not a problem > while there are few columns,