Re: OS X cake bake woes

2009-05-13 Thread Graham Weldon
Hey, What is your php.ini value for "mysql.default_socket" set to? This will tell PHP where your socket file is for MySQL, and help get you connected. You can check this file location by looking in your MySQL my.cnf file for the line indicating "socket = " For example, a MAMP install has the

Re: Append something to the Flash message

2009-05-13 Thread eveningskyline
Thanks for asking this, Roman, and thank you, Nancy, for answering! This saved me a lot of headache. On May 11, 11:12 pm, Nancy wrote: > What I do is save my messages to an array then do an join and setFlash > to the results of that join. >                 array_push($messages,'The Rule Exceptio

How do I pass data from my javascript in 'before' to my controller?

2009-05-13 Thread Jared
I want to analyze some forms in the 'before' code execution of my ajax call, then pass the collected data to my controller action to decide what to do. How can I do this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

Auto escaped variables?

2009-05-13 Thread Misplacedme
I'm a cake noob, so if this is obvious, I apologize. I have a form, and when it's submitted, I grab a username out of the database using this line. $this->User->find('all', array( 'conditions' => array('User.username' => $this->data['User']['username']), 'fields' => array ('User.password') ) );

OS X cake bake woes

2009-05-13 Thread harrzack
This is on OS X 10.4.11 with latest XAMPP install. Having probs getting cake bake to use the correct PHP. When I try to bake a contoller I'm getting the famous error message(s): "Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) in /WebDev/

Ajax before and after options

2009-05-13 Thread Jared
Is it possible to pass the values of variables obtained in my javascript code executing before the ajax call to the script i execute after the ajax call returns? basically i have a dynamic form that gets new elements based on some logic depending on what the user clicks. The form has some text i

Model Association based on user_id

2009-05-13 Thread Dan
I have two models, Content and Score. The Score model has a reference to a User (user_id) the Content model (content_id). Therefore, there can be many Scores associated with Content. So far, this is sounding like a cut-and-dry Content -> hasMany -> Score association, right? Now, when I retrieve C

Using SMTP Email Component

2009-05-13 Thread randalle2
Hello guys, I need some help here... I making a contact form using Cakephp 1.2. The problem upon sending email..The notification was successful but I couldn't receive the emailIs there something wrong with my code? Can anyone help me here? Form view: create("Guest" array("url"=>"controller/c

Re: ACL issue

2009-05-13 Thread John Andersen
Ok, I will try to look at it in between working :) ... Hopefully someone else may know about this too, and reply to you while I am looking! John On May 13, 5:06 pm, "Dave Maharaj :: WidePixels.com" wrote: > Hello John, > > This is what I see when I run buildAcl from the browser (x 238 times j

Re: Null value for tinyint field

2009-05-13 Thread John Andersen
Hi Brian, I agree that NULL can be used, if you are not specifically tracking/ looking for a "Not answered" value. If the specification is to have the possibility to know that a field has the value of either "Not answered", "No", "Yes", then I will always define all the valid values (the domain)

Re: really really lost

2009-05-13 Thread Braydenstyles
yes that all makes sense now ... there is one tucked ever so neatly inside thanks i don't know why i didn't see that ... Cheers!!! On May 12, 4:11 am, "rich...@home" wrote: > It sounds like they have a dev version of the site tucked away in the > webroot. > > Live site ->http://www.example.com/

Re: Constructing my $conditions array

2009-05-13 Thread Dr. Loboto
You should properly escape value before put it in SQL: 'MATCH(SearchIndex.data) AGAINST('. ConnectionManager::getDataSource($this->ModelName->useDbConfig)->value ($this->params['named']['search']). ') IN BOOLEAN MODE)' On May 14, 6:50 am, Kyle Decot wrote: > Awesome! I thought when you used an

Re: notEmpty rule is not responding.

2009-05-13 Thread Dr. Loboto
@Miles J: No. They serve different cases. "notEmpty" is to have content in field and "required" is to have field itself. @cbhan: How is rule "not responding" exactly? Always false or always true? Output $this->data and check what are you trying to save/ validate. On May 14, 2:47 am, Miles J wro

Re: Question about how manage particular data in session

2009-05-13 Thread Dr. Loboto
Example of this approach: 1. User visit index page and click on some "page1" link. You receive request for that "page1" - you know service_id (for example it is 5) and referer points to "index", so you save initial "page1" => $service_id to session. 2. On that page user follow next link "page2". Y

Re: Error Installation CakePHP 1.2.

2009-05-13 Thread brian
I suggest that you consider upgrading to version 5.x as Cake may not support PHP4.x for much longer. This isn't an official announcement, only based on the number of people who have been strongly suggesting that Cake no longer support it. In any case, PHP4.x itself has been discontinued for a ver

RE: What is the best way?

2009-05-13 Thread Dave Maharaj :: WidePixels.com
Basically I broke up the HABTM tables into categories where to end user can only select from the options, no ability to add options. The forms (for each HABTM )are rendered AJAX in sections (reason why they are separate HABTM because if a user updated their 'skills' it would delete anything not se

Re: Error Installation CakePHP 1.2.

2009-05-13 Thread genobee
Thanks for the replay. You just cleared my doubt since cakephp 1.2 web documentation never mentioned which PHP 4 version supported. On May 14, 8:52 am, andy wrote: > Cake requires PHP 4.3.2 or greater > > On May 13, 12:22 am, genobee wrote: > > > Hi CakePHP Group, > > > I'm new to this and usin

Re: Database Associations Not Linking Up

2009-05-13 Thread andy
Can you post the code you are using to retrieve and display the data? On May 12, 3:17 pm, Site Reference wrote: > Hey all, > > I apologize if this is a bit of a newbie question, but I am having > trouble getting my database associations to link up...here is what I > have: > > MySQL Tables > > CR

Re: What is the best way?

2009-05-13 Thread andy
Personally, I would keep the tables separate. I have never tried the tree behavior, but it sounds like it could harder to maintain as the table grows than separate tables. Will there ever be a need for the user to update fields from all tables in one form (your explaination didn't seem clear to me

Re: Error Installation CakePHP 1.2.

2009-05-13 Thread andy
Cake requires PHP 4.3.2 or greater On May 13, 12:22 am, genobee wrote: > Hi CakePHP Group, > > I'm new to this and using CakePHP 1.2 framework. I've trouble for my > production installation and would like to ask for help from > CakePHPGroup. The content uploaded from my local which is running ok

Re: Constructing my $conditions array

2009-05-13 Thread Kyle Decot
Awesome! I thought when you used an array, you had to provide a key. Thanks Brian! On May 13, 7:41 pm, brian wrote: > I meant that you can add it to the array, though as a string (ie. no key). > > $conditions[] = 'MATCH(SearchIndex.data) AGAINST(\'' >        . $this->params['named']['search'] >

Re: Constructing my $conditions array

2009-05-13 Thread brian
I meant that you can add it to the array, though as a string (ie. no key). $conditions[] = 'MATCH(SearchIndex.data) AGAINST(\'' . $this->params['named']['search'] . '\') IN BOOLEAN MODE)'; On Wed, May 13, 2009 at 7:24 PM, Kyle Decot wrote: > > Oh, my bad. I must have typed it inco

Re: api.cakephp.org still broken

2009-05-13 Thread brian
I've also noticed problems with the source view in FF where it's impossible to scroll (using the scrollbar, mousewheel, or keyboard). It seems a bit like a Heisenbug, though. I've had it happen when viewing a particular method, then it won't happen another time. Anyway, the quick solution is to di

Re: Private functions

2009-05-13 Thread brian
On Wed, May 13, 2009 at 5:32 PM, Dave Maharaj :: WidePixels.com wrote: > Quick question about ensuring functions can not be run from the URL. Would > this be the correct setup? > > controller; > $key = $this->Model->__someFunction($key); > > model: > function __someFunction($key) >    { >   .

Re: Constructing my $conditions array

2009-05-13 Thread Kyle Decot
Oh, my bad. I must have typed it incorrectly. They should all be $conditions; I'd rather do it in an array because I have a lot of different conditions/fields that can go into the array. Is it possible to do MATCHES in an array? On May 13, 7:20 pm, brian wrote: > You mention both $conditions &

Re: Constructing my $conditions array

2009-05-13 Thread brian
You mention both $conditions & $criteria so it's a bit difficult to say for sure. But that last bit would probably work better as one complete string. 'MATCH(SearchIndex.data) AGAINST(\'' . $this->params['named']['search'] . '\') IN BOOLEAN MODE)'; On Wed, May 13, 2009 at 6:37 PM

Constructing my $conditions array

2009-05-13 Thread Kyle Decot
I am attempting to construct my array but am having some problems w/ the $conditions array. I am doing something like: $conditions = array("Model.approved"=>1); if($something == $something_else) $conditions['Model.something'] = 1; if(!empty($search)) { $criteria["MATCH(SearchIndex.data

Re: Poll: what do you hate about CakePHP?

2009-05-13 Thread yodi
DateTime type on Mysql Table, it's better using timestamp with datetime format (-00-00 00:00:00) Seems it doesn't important, but we know that datetime bits is bigger than timestamps. That's way, all my created and modified table using timestamp. On Thu, 2009-05-07 at 15:29 -0700, Nate w

Re: indirect belongsTo association?

2009-05-13 Thread Mike
I was unfamiliar with the "Containable" behavior which is documented here: http://book.cakephp.org/view/474/Containable The primary intended use of this behavior seems to be to restrict the associations that are pulled in, but it can also be used to pull in additional data. I set up the Contai

Private functions

2009-05-13 Thread Dave Maharaj :: WidePixels.com
Quick question about ensuring functions can not be run from the URL. Would this be the correct setup? controller; $key = $this->Model->__someFunction($key); model: function __someFunction($key) { ... return $something; } If so basically anything double underscored is for cakes i

Re: generating slug from title - must be unique! (using sluggable-1.1.3)

2009-05-13 Thread mig_akira
Alexandru Ciobanu-4 wrote: > > > On 05/13/2009 06:23 PM, mig_akira wrote: >> >> >> $conditions = array($Model->alias . '.' . >> $this->__settings[$Model->alias]['slug'] =>' LIKE ' . $slug . '%'); >> >> > I can't recall when the change was made but your code won't work with > any recent c

Re: password field

2009-05-13 Thread dr. Hannibal Lecter
Auth is a component, therefore, in your controller: var $components = array('Auth'); And you also need to set the params where necessary. But you've read the manual, right? On May 13, 9:54 am, lakers fan wrote: > it didnt.. should I just use $uses = array('Auth');?? > > > Date: Wed, 13 May 200

Re: No ID returning from the model when inserting new record

2009-05-13 Thread Faza
It's a bit weird, especially that calling the same function to edit the record returns the proper id. i use the same property with such syntax: if ($this->Design->saveAll($this->data)) { $this->notify(2,$this->Design->id); $this->redirec

Re: validation: 1 rule for 2 or more fields

2009-05-13 Thread Alexandre Brasil
Hi Stu, After your light, I guess to figure out the issue: Here's the code within the model (I just named Ab) field1 is author_id and field2 is book_id var $name = 'Ab'; var $validate = array( 'author_id' => array( 'rule' => array('uniqueValidation', 'Ab', 'author_id', 'book_id'),

Re: api.cakephp.org still broken

2009-05-13 Thread Brendon Kozlowski
James, that's a poor response for IE. However, what should be said instead would be: If you have some possible fixes for the CSS and IE, you can try and submit a ticket at the API Generator's project page on TheChaw(.com). On May 13, 11:13 am, James K wrote: > I have no problems viewing the API

Re: Add "created" field to HABTM join tables

2009-05-13 Thread Lucas Velasco
Hi Brendon, Same problem even after modifying the datetime field to Allow Null and default to Null. Any ideas? Thanks. Lucas On May 8, 1:57 am, Brendon Kozlowski wrote: > The `created` field must (1)be a datetime field, (2)NULL must be > allowed, (3)and default to NULL value.  Once that field

Re: $useTable ignored when using bindModel()?

2009-05-13 Thread deefens
Dr. Loboto, you saved my day. Thank you so much, now its working properly @MPeg: check your model-filenames, in my situation this was the fault On 13 Mai, 10:28, MPeg wrote: > Hi, I have the same problem in my application: "useTable" it seems to > be ignored. > > I use a model's class in his

Re: Question about how manage particular data in session

2009-05-13 Thread Miles J
Are you referring tabs, like in firefox tabs, or tabs within the website? --~--~-~--~~~---~--~~ 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

Re: notEmpty rule is not responding.

2009-05-13 Thread Miles J
You dont need require true if you are using notEmpty. Kinda conflicting dont you think? --~--~-~--~~~---~--~~ 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 T

Re: indirect belongsTo association?

2009-05-13 Thread Miles J
You would have to set the belongsTo to the item, and then the item belongsTo the master. And just use containable. $results = $this->Request->find('all', array('contain' => array('Item' => array('Master'; --~--~-~--~~~---~--~~ You received this message because

Re: Poll: what do you hate about CakePHP?

2009-05-13 Thread Juan Luis Baptiste
+1 for better ACL documentation, offcial docs and the tutorials out there have been very frustrating for me :( Juancho On Thu, May 7, 2009 at 5:29 PM, Nate wrote: > > Well, maybe hate's a strong word.  Let's say, what do you like the > least?  Kind of an odd question, I know, but since we've ki

indirect belongsTo association?

2009-05-13 Thread Mike
My database has "request" table with a foreign key to a "item" table. The "item" table has a foreign key to a "master" table. I'd like to define something like an "indirect belongsTo" association in the "request" model to the "master" table so that I can display "master" information when I'm disp

ajaxHelper - passing value of form field to action

2009-05-13 Thread JamesF
hello there quick question with ajaxHelper i have a few select boxes on the page and i need one to update based upon the value of the other. i dont have a problem getting it to call an action via observeField BUT i can't seem to pass that action the value of the form field. here is my code: ech

Re: Multiple Databases and Multiple Cakes

2009-05-13 Thread BaronNowhere
Found 2 links which help described what I think I need. I'm still tinkering, but I thought I'd share the links here in case someone searches for the same question. http://nik.chankov.net/2008/04/10/using-more-than-one-database-connection-in-cakephp/ http://savasplace.com/2009/05/multiple-databa

Re: generating slug from title - must be unique! (using sluggable-1.1.3)

2009-05-13 Thread Alexandru Ciobanu
On 05/13/2009 06:23 PM, mig_akira wrote: > > > $conditions = array($Model->alias . '.' . > $this->__settings[$Model->alias]['slug'] =>' LIKE ' . $slug . '%'); > > I can't recall when the change was made but your code won't work with any recent cakephp releases. It should be: $conditions = a

Form validation in 1.2 + Unable to create 'controller' file through

2009-05-13 Thread swiftguy
Hello All, Facing 2 issues Issue 1 -- Trying to create a simple form validation using the new 1.2 validation method. I want simple not_null input validation on a alphanumeric field..but when i click on the 'submit' but

Re: Null value for tinyint field

2009-05-13 Thread brian
On Wed, May 13, 2009 at 9:18 AM, John Andersen wrote: > > Hi Drake, > > You should not use a NULL as a meaningfull value (NULL is exactly - no > value). If you want your questions to reflect the possibilities of: > 1) Not answered. > 2) A Yes answer; > 3) A No answer; > you should design your col

Re: validation: 1 rule for 2 or more fields

2009-05-13 Thread Alexandre Brasil
Hi Stu, After your light I think that figure out the question. In the example below, name and country are the couple fields I was talked. The model is Author. here's the code (With more time, should it be optimied?) within the model author.php var $validate = array( 'name' => array(

Re: sorting a table with javascript (no page reloads)

2009-05-13 Thread brian
I've used sorttable in the past. But, now that I use jQuery ... function userSetup() { ... $('#users_list .PaginationLinks a, #users_list thead .Actions a').click(function() { showIndicator('#content'); var href = $(this).attr('href');

Re: generating slug from title - must be unique! (using sluggable-1.1.3)

2009-05-13 Thread mig_akira
Hi, thanks for answering. It was supposed to increment a number at the end, but it seems that there's a bug in the code. Changing line 121 to $conditions = array($Model->alias . '.' . $this->__settings[$Model->alias]['slug'] =>' LIKE ' . $slug . '%'); And line 125 to $conditions[$Model->alia

Re: api.cakephp.org still broken

2009-05-13 Thread James K
I have no problems viewing the API in Firefox 3.5 or Firefox 2.x, Chrome, or Opera 9.x under Windows. As for IE stop using IE? - James On May 13, 12:54 am, Mr-Yellow wrote: > For months now the API documentation site has not been accessible to > IE. > > The search button is stretched over

validate a saveAll array piece-by-piece (or model-by-model)

2009-05-13 Thread Ernesto
Hello i have an array,returned from a view, similar to this: Array( [Customer] => Array( [Name] => XXX [Surname] => YYY ) [Orders_Customer] => Array( [0] => Array( [Code] => )

Re: Poll: what do you hate about CakePHP?

2009-05-13 Thread nurvzy
@Miles J: That's why a toggle would be nice in the core to use associative or full fledged model objects. It would be nice to run model functions off the returned object in either the controller or view without having to set the model's id. Furthermore, if you needed to manipulate two objects of

Re: validation: 1 rule for 2 or more fields

2009-05-13 Thread Alexandre Brasil
Dear rartavia, Thanks for your reply. Actualy, it's not work, because the couple fields (1 & 2) need to be unique at the SAME TIME. For instance: field1 | field2 | status 1 | 1 | allow 1 | 2 | allow 2 | 1 | allow 2 | 2 | allow And the system can not allo

RE: ACL issue

2009-05-13 Thread Dave Maharaj :: WidePixels.com
Hello John, This is what I see when I run buildAcl from the browser (x 238 times just the alias` = 'apply' changes for each controller action) 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`

Cake & Sybase

2009-05-13 Thread Alisson Prestes
Hi, I'm developing a application and I need to use Sybase as database. I read in http://groups.google.com/group/cake-php/browse_thread/thread/862a01ace2a18ec4that Sybase and Cake have many incompabilities, and most of developers give up using the both together. I would like to know if is there any

Re: Poll: what do you hate about CakePHP?

2009-05-13 Thread Flipflops
1. Lets loose PHP4 asap 2. Hidden input fields should a default class applied something like: .hidden-input perhaps - if you have forms with coloured background then it can be a real nightmare making sure hidden fields stay hidden (not everybody uses firefox) - I'm sure everybody has scratched th

Re: Null value for tinyint field

2009-05-13 Thread John Andersen
Hi Drake, You should not use a NULL as a meaningfull value (NULL is exactly - no value). If you want your questions to reflect the possibilities of: 1) Not answered. 2) A Yes answer; 3) A No answer; you should design your column accordingly - to be able to hold three values (0 - not answered, 1 -

proper way to handle year fields

2009-05-13 Thread Günther Theilen
Hi, in my database I have a field named 'year' which has the type year(4). In the add form I would like to have a select field for the years. So I added this: e($form->year('year')); If I try to save the form I get an "array to string conversion error" and "Unknown column 'Array' in 'field lis

sorting a table with javascript (no page reloads)

2009-05-13 Thread qwanta
I was looking for a way to sort a table without requerying the database for the data with a new ORDER clause. This javascript library I found did just that, so I thought I would share it. http://www.kryogenix.org/code/browser/sorttable/ All you have to do is download sorttable.js and place in t

No ID returning from the model when inserting new record

2009-05-13 Thread oly.ya...@googlemail.com
Hi I'm having an issue where when I insert a new document into the database I'm not getting the id of the new record back. The save function looks like this: function save() { if($this->Document->save($this->data)){ $documentid = $this->Document->id; $message = '"S

Possible bug in creating the POT file for I18N from cake command line

2009-05-13 Thread kadanis
Just something I've come across, and wondered if anyone else has noticed it. I've searched around a bit but not seen anything posted. Relatively new to Cake so not sure if this is common. I have table headers in a view for a paginated list of data like this: sort(__('Name', true), 'list_name');

Re: TCPDF & FPDI inside Cake...

2009-05-13 Thread ryan
Hmmm, yeah, I still get the same error. I guess I will keep messing around with it, maybe read the documentation a little closer :/ thanks. On May 13, 7:43 am, nini wrote: > I'm just using >   $this->pdf->setSourceFile($init_data['settings'] > ['pdftemplate_to_load']); >   $this->pdf->useTempla

Re: TCPDF & FPDI inside Cake...

2009-05-13 Thread nini
I'm just using $this->pdf->setSourceFile($init_data['settings'] ['pdftemplate_to_load']); $this->pdf->useTemplate($this->pdf->importPage(1)); without class extends notation (i think, it didn't worked for me when i was writing this stuff) On May 13, 1:30 pm, ryan wrote: > Hmmm, Thank you for

Re: TCPDF & FPDI inside Cake...

2009-05-13 Thread ryan
Hmmm, Thank you for the response. I get the following error though when I trying to use FPDI methods: Fatal error: Cannot access protected property XFPDI::$PDFVersion in / (...)/vendors/fpdi/fpdi_pdf_parser.php on line 381 In my test code, I had just wrote the following inside of pdf.ctp App

Re: notEmpty rule is not responding.

2009-05-13 Thread cbhan
Thanks arif ,but i think VALID_NOT_EMPTY,is deprecated in Cake12, i made use of it ealier but same result.. On May 13, 3:44 pm, arif hossen wrote: > Please apply this code for your problem slove. > > var $validate = array( >     'name' => array( >          'rule' => VALID_NOT_EMPTY, >          '

Re: Question about how manage particular data in session

2009-05-13 Thread byqsri
Sorry but in this way I must keep in session all pages the user load with relative service_id? On 13 Mag, 05:34, "Dr. Loboto" wrote: > You should save service_id in session as associative array: > current_url => service_id. When your controller/action is requested, > search service_id in session

Re: Poll: what do you hate about CakePHP?

2009-05-13 Thread Mark (Germany)
after so many years still too "american"! no real multi-lingual support for usage in other languages than just englisch e.g. the mb_() function problem i already pointed out 12 months ago with utf8 as default + mb_() functions there wouldn't be any trouble On 13 Mai, 11:57, majna wrote: > Th

Re: notEmpty rule is not responding.

2009-05-13 Thread arif hossen
Please apply this code for your problem slove. var $validate = array( 'name' => array( 'rule' => VALID_NOT_EMPTY, 'allowEmpty' =>false, 'required' => true, 'message'=>'Name field can not be empty.' ) ); On Wed, May 13, 2009 at 3:53 PM, cbhan wrote: >

base path route don't work

2009-05-13 Thread MIRAGE
hello! I have problem with base path route. In routes.php: Router::connect ('/', array('controller'=>'sites', 'action'=>'index')); but when I connect to http://localhost/ - I get content of apache htdocs dir. I make chages in httpd.conf and set mod_rewrite how its describe here http://book.ca

Re: Null value for tinyint field

2009-05-13 Thread theChrisWalker
try unsetting the key in the data you save. You have said that the key exists when you check the passed data. Cake has probably put in a dummy field to provide a default value. If you unset the key then it should not pass any data to the database and provided the field defaults to null in the dat

notEmpty rule is not responding.

2009-05-13 Thread cbhan
I am using cake_1.2.2.8120 ,notEmpty rule is not responding. // model code: var $validate = array( 'name' => array( 'rule' => 'notEmpty', 'required' => true, 'message'=>'Name field can not be empty.' ) ); //view code create(array( 'enctype' => 'mult

Re: Poll: what do you hate about CakePHP?

2009-05-13 Thread majna
Think Routing.admin and prefix routing implementation is not complete. -prefix routing ignores reverse routing and pagination -Routing.admin accepts only one string maybe Routing.admin should be removed and replaced with prefix routing completely. On May 8, 3:08 pm, Smelly Eddie wrote: > I hat

Re: Poll: what do you hate about CakePHP?

2009-05-13 Thread Miles J
@nurvzy - Returning objects from a mysql resource and slower then an associative array. I for one would hate to have to use objects within views. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To pos

Re: Poll: what do you hate about CakePHP?

2009-05-13 Thread Miles J
@Sergei U why wouldn't helpers and components be in the controller. Where else would they go. On May 13, 1:12 am, Sergei wrote: > Don't like: > > * PHP4 support (some years back I thought it as advantage!) > * too resticted by conventions (at first I liked it too) > * $helpers=array(..) and

Re: database naming convention in conflict with cakePHP naming convention

2009-05-13 Thread Miles J
You would set the "foreignKey" or "assocationForeignKey" when creating the associations. --~--~-~--~~~---~--~~ 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

Re: Duplicate Queries Problem with Containable

2009-05-13 Thread Miles J
Why is your query written so weird? Shouldnt it be: $data = $this->Client->find('first', array( 'conditions' => array( 'Client.id' => $id ), 'contain' => array(

Re: Lang in url and named parameters

2009-05-13 Thread Pixelastic
Hmm, I'm not quite getting what you're saying. > You don't need an extra parameter, I think you can use this code on app_helper.php: Well, isn't the language parameter an extra parameter ? Anyway, I'm allready using a similar code than the one given by teknoid, and it works well. By problem was

Re: Duplicate Queries Problem with Containable

2009-05-13 Thread Astro
Anyone else having a solution for this? On May 12, 3:25 pm, Jérémie wrote: > Actually, seems it's a known bug and that we have to wait for Cake > 2.0 :(https://trac.cakephp.org/ticket/5336 > > On 12 mai, 15:16, Jérémie wrote: > > > > > Hi, > > > I've got the same problem > > Hope someone can he

Re: TCPDF & FPDI inside Cake...

2009-05-13 Thread nini
I've created a new pdf layout: pdf.ctp: App::import('Vendor','tcpdf/tcpdf'); App::import('Vendor','fpdi/fpdi'); $this->pdf = new FPDI(); settings etc... return as string: echo $this->pdf->Output(null, 'S'); or other output types: $this->pdf->Output($init_data['settings']['filename'], $init_data

Re: Underscores do what??

2009-05-13 Thread majna
Use some PHP IDE like Eclipse PDT or NetBeans: When you hover mouse on that function, code insight will show nice comments like: "Returns a translated string if one is found; Otherwise, the submitted message." You can even ctrl+click on that function and OMG! It's there! On May 12, 5:30 pm, Stu

Re: database naming convention in conflict with cakePHP naming convention

2009-05-13 Thread j.h09
Thank you very much, That answers my question for the plural form of a table name and the primary key. But what about the foreign key 'operatorId'? How can I make cakePHP use a foreign key suffixed by 'Id' instead of '_id' ? --~--~-~--~~~---~--~~ You received t

Re: Poll: what do you hate about CakePHP?

2009-05-13 Thread fred
A plugin management system, for plugin, component, behavior, etc... would be nice --~--~-~--~~~---~--~~ 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 unsu

Re: $useTable ignored when using bindModel()?

2009-05-13 Thread MPeg
Hi, I have the same problem in my application: "useTable" it seems to be ignored. I use a model's class in his own controller correctly so I think Cake is able to load it via naming convenctions correctly to! I think so but Cake still ignore mi configuration in relations! What to do? I hate to

Re: Poll: what do you hate about CakePHP?

2009-05-13 Thread Sergei
Don't like: * PHP4 support (some years back I thought it as advantage!) * too resticted by conventions (at first I liked it too) * $helpers=array(..) and $components=array(..) in controllers. I really like the new Yii framework -- very powerful, fast and more important, flexible. Comparing to Ca

RE: password field

2009-05-13 Thread lakers fan
it didnt.. should I just use $uses = array('Auth');?? > Date: Wed, 13 May 2009 00:51:25 -0700 > Subject: Re: password field > From: drlob...@gmail.com > To: cake-php@googlegroups.com > > > Auth component hashes password automatically. > > On May 13, 2:38 pm, lakers fan wrote: >> Hello, Is

Re: password field

2009-05-13 Thread Dr. Loboto
Auth component hashes password automatically. On May 13, 2:38 pm, lakers fan wrote: > Hello,     Isnt password field automatically hashed??. if not can someone let > me know how i can hash the password field automatically? > Thanks,Bharani > _

password field

2009-05-13 Thread lakers fan
Hello, Isnt password field automatically hashed??. if not can someone let me know how i can hash the password field automatically? Thanks,Bharani _ Windows Live™: Keep your life in sync. http://windowslive.com/explore?ocid=TXT_TA

Re: generating slug from title - must be unique! (using sluggable-1.1.3)

2009-05-13 Thread Braindead
As far as I can see from the source, the sluggable behavior increments a number at the end of the slug in the case the slug is already in use. Pls. check the beforeSave event of the sluggable behavior. Markus --~--~-~--~~~---~--~~ You received this message because

Error Installation CakePHP 1.2.

2009-05-13 Thread genobee
Hi CakePHP Group, I'm new to this and using CakePHP 1.2 framework. I've trouble for my production installation and would like to ask for help from CakePHPGroup. The content uploaded from my local which is running ok. I've done and checked these: 1. Clear model and persistent cache. 2. I didn't g

Re: Special validation requirement - how do I preserve form values?

2009-05-13 Thread Ernesto
1) it's better to validate data in model. 2) can you post your view and controller code? On 13 Mag, 04:08, Jules wrote: > I have a form where, if the user enters the same value into two > fields, they see an error message and have to fill in the form again. > > 1) I compare the two fields in th