Re: Don't see related tables in view (newbie)

2007-11-29 Thread Grant Cox
For reference, the conventions you are missing are: table names are plural - use 'people' and 'positions' 'id' as primary key for all tables 'foreign_id' for foreign keys - so your 'person.position' field should be 'people.position_id' With these changes your models would just be: class Person

Re: Am I trying to do the impossible (or impractical)?

2007-11-29 Thread zonium
I think your setup is not impractical, in fact it's a very common type of relationships, for example: User hasMany Address, and there is one Address that is used as default Theme hasMany Layout, and there is one Layout that is set as current etc. Using array as Christopher suggested is a solution

Exclude a folder voor routing

2007-11-29 Thread [EMAIL PROTECTED]
I have the following problem: my root folder looks like this: /app /awstats /cake /docs /vendors .htaccess index.php I would like to get http://www.domain.com/awstats to go to the directory /awstats, and not to route to cake. I tried the following, that didn't work. I changed root .htaccess f

SQL problem with new installation of cakephp with MS access

2007-11-29 Thread kindo
Hello, I have almost spent the whole day at the office trying to look for a solution for this error: I have a newly installed cake 1.2.x.x which I would want to connect to an MS access database (2000 file format). Thanks to the people in this group, I have found solution to this and finally conne

Re: Modeling Recursive Relationships

2007-11-29 Thread Adam Royle
I'm not sure if I understand your question... with lists and sublists etc, but I did something similar with events and sub-events. Your "lists" table should contain something like (id, parent_id, name, account_id). class List extends AppModel { var $name = 'List'; var $belongsTo

Re: Am I trying to do the impossible (or impractical)?

2007-11-29 Thread J.B.
zonium: yes, you're absolutely right. and I haven't tested it... Remember to put two associations in the address model as well, address hasOne (or hasMany, depending on what you want) customer (default_address_id) and address belongsTo customer... On 29 Nov, 10:27, zonium <[EMAIL PROTECTED]> wrot

Re: Get the "get" param

2007-11-29 Thread Bruno
On 28 nov, 21:33, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On Nov 28, 2007 3:18 PM, Bruno <[EMAIL PROTECTED]> wrote: > > > > > I have a link in a view with a get request : > > > $html->link("upload", "/posts/upload?userid={$output['User']['id']}), > > > In the upload function of the controll

Re: Get the "get" param

2007-11-29 Thread Bruno
Thank a lot Chris, your response was helpful I can take url parameter with this code : $this->params['url']['userid'] CakePhp is really wonderfull. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" gr

Save doesn't work with Postgres

2007-11-29 Thread Rhee
Does anybody have problem to use Save function with Postgres? Everytime I call $this->Model->save($this->data) I get the following notice messages (repeated 4 times): Notice: Undefined index: name in /var/www/htdocs/sid/cake/libs/model/ dbo/dbo_postgres.php on line 350 and then: Warning: Cannot

How to add .html suffix to CakePHP urls?

2007-11-29 Thread Eemerge
Hello to everybody on this group! I am just starting up with CakePHP, and i was wondering if its possible to add the .html suffix to cake`s urls Example: instead of http:/www.mydomain.com/posts/my-new-post/ i would like it to be http://www.mydomain.com/posts/my-new-post.html Any help would be

How to "INNER Join" in Model ?

2007-11-29 Thread foxmask
Hi i'd like to know what i need to do and in what model, to be able to use this SQL query SELECT t.id, t.subject FROM topics AS t INNER JOIN forums AS f ON f.id=t.forum_id LEFT JOIN forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='xxx') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND

Re: How to add .html suffix to CakePHP urls?

2007-11-29 Thread Baz
http://www.webdevelopment2.com/the-secret-of-cakephp-advanced-routing-even-better-urls/ -- Baz L Web Development 2.0: Web Design, CakePHP, Javascript http://www.WebDevelopment2.com/ On Nov 29, 2007 5:20 AM, Eemerge <[EMAIL PROTECTED]> wrote: > > Hello to everybody on this group! > I am just star

Re: Am I trying to do the impossible (or impractical)?

2007-11-29 Thread Rhee
I would put a bool flag in addresses table. Something like `defaultAddress` as bool, where set to true when default and false on the other case. Then you could put WHERE statement into your find function. On Nov 29, 11:50 am, "J.B." <[EMAIL PROTECTED]> wrote: > zonium: yes, you're absolutely righ

Cake 1.2 isUnique validation

2007-11-29 Thread RichardAtHome
Hi all. I've been trying to get the isUnique validation to work in cake 1.2 but I don't seem to be able to get the syntax right. Ultimately I'd like it to check the uniqueness of two fields together, but I can't even get it working with one at the moment. I have the following validation rule in

Using v1.2 Pagination with Data Filters

2007-11-29 Thread Rob
I have a simple page set up to display a table of customers. Two of the colums have Pagination->sort on them. I also have a form on the same page that allows me to select a specific customer from the customer column, and/or a specific report from the report column. This all works fine, until I cl

Re: mysql_connect() fails although mySql support is enabled.

2007-11-29 Thread lynch
I think, the mysql extension is installed. I tested it with: "; echo "XML:" . extension_loaded('xml') . ""; echo "imap:" . extension_loaded('imap') . ""; echo "mysql:" . extension_loaded('mysql') . ""; echo "iconv:" . extension_loaded('iconv') . ""; ?> and i got the following output. 5.2.5

Re: mysql_connect() fails although mySql support is enabled.

2007-11-29 Thread lynch
I think, the mysql extension is installed. I tested it with: "; echo "XML:" . extension_loaded('xml') . ""; echo "imap:" . extension_loaded('imap') . ""; echo "mysql:" . extension_loaded('mysql') . ""; echo "iconv:" . extension_loaded('iconv') . ""; ?> and i got the following output. 5.2.5

including javascript file in default layout

2007-11-29 Thread sMAshdot
Hello! I have added the Javascript Helper to the $helpers array in my controller, and have a file called functions.js in the app/webroot/js/ directory. The server (apache2) has it's document root pointing at app/webroot/ (production mode). now link('functions.js') ?> in the default.thtml layout

Re: How to add .html suffix to CakePHP urls?

2007-11-29 Thread Eemerge
Thanks, i will look into it. On Nov 29, 2:20 pm, Baz <[EMAIL PROTECTED]> wrote: > http://www.webdevelopment2.com/the-secret-of-cakephp-advanced-routing... > > -- > Baz L > Web Development 2.0: Web Design, CakePHP, > Javascripthttp://www.WebDevelopment2.com/ > > On Nov 29, 2007 5:20 AM, Eemerge <

Re: bake function, Fatal Error, Call to undefined function mysql_connect()...

2007-11-29 Thread lynch
I exactly have the same Problem under Linux, but i cant get along with this. extension_loaded() says, that mysql extension is enabled. The database is and phpmyadmin a working, too. Any ideas? --~--~-~--~~~---~--~~ You received this message because you are subscr

Re: Don't see related tables in view (newbie)

2007-11-29 Thread powtac
Table scheme: peoples id name email positions_id OR position_id ??? foreign table name plural or singular ??? positions id description --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post

cake + php5 = bad performance?

2007-11-29 Thread MikeK
I have recently taken our server running php 4.4.7, MySQL4, and Apache 1.3 and moved it to php 5.2.4 While everything was fine from a compatibility standpoint, the performance of our exact same cake application was from 30-50% slower on a per action basis, as well as the memory usage being about

Re: bake function, Fatal Error, Call to undefined function mysql_connect()...

2007-11-29 Thread Martin Wood-Mitrovski
Did you check the php.ini for the command line php? As Daniel said, the cli version uses a different php.ini to the one you get in the webserver. lynch wrote: > I exactly have the same Problem under Linux, but i cant get along with > this. > > extension_loaded() says, that mysql extension is e

Re: cake + php5 = bad performance?

2007-11-29 Thread Chris Hartjes
On Nov 29, 2007 10:16 AM, MikeK <[EMAIL PROTECTED]> wrote: > > While everything was fine from a compatibility standpoint, the > performance of our exact same cake application was from 30-50% slower > on a per action basis, as well as the memory usage being about 20% > higher. The ONLY thing differ

Re: cake + php5 = bad performance?

2007-11-29 Thread powtac
We did some benchmarks (not with cake) and figured out, that hard objectorientated code in PHP5 is slower than PHP4! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email

Re: using cake to make a light database administration app

2007-11-29 Thread alex.tomes
Hi guys, After experimenting with your advice and ideas I've found the solution that was in fact very simple. For example for a list of databases: In the model I would declare just : var $useTable= false; and in the controller I would do: $this->Myadmin->query('SHOW DATABASES'); and it worked! T

Default Admin Routing for Forms in 1.2 Pre Beta

2007-11-29 Thread Bruno Bergher
Hi everyone! We just moved an application we developed in 1.2.0.5427 alpha to the latest pre beta release. Everything worked fine except for just one thing: In admin 'edit' actions, FormHelper is being supplied with wrong action URLs. With index, view, add and deletr actions, there's absolutely

Re: Cake 1.2 isUnique validation

2007-11-29 Thread sMAshdot
On 29 Nov., 13:40, RichardAtHome <[EMAIL PROTECTED]> wrote: > As a side note, I suspect isUnique might not meant to be referenced in > a rule and is meant to be referenced in the controller. If this is > true can someone point me towards some examples of how / where it > should be used? I'm quit

Re: bake function, Fatal Error, Call to undefined function mysql_connect()...

2007-11-29 Thread lynch
What do you mean with command line php? Sorry this is all new to me, could you give me a hint. But i in my phpinfo() site, there is the(configure command) line -- disable-cli, should i erease this line? I just have no idea what cli does. --~--~-~--~~~---~--~~ You

Re: bake function, Fatal Error, Call to undefined function mysql_connect()...

2007-11-29 Thread Chris Hartjes
On Nov 29, 2007 11:10 AM, lynch <[EMAIL PROTECTED]> wrote: > > What do you mean with command line php? Sorry this is all new to me, > could you give me a hint. > > But i in my phpinfo() site, there is the(configure command) line -- > disable-cli, should i erease this line? I just have no idea what

Re: Cake 1.2 isUnique validation

2007-11-29 Thread MrTufty
And is entirely wrong... well, no, it'll work, but it doesn't take advantage of CakePHP 1.2 validation. The IBM tutorials are good, but outdated now. Richard, as you suspect, you're not supposed to be referencing isUnique in a rule. But, you don't need to use it in the controller. Here's how you'

Re: a lot of the features that make rails so cool are totally missing in cake :(

2007-11-29 Thread Sliv
Also there is of course http://tempdocs.cakephp.org/ and the custom google search link on the cake front page On Nov 28, 6:53 pm, "Christopher E. Franklin, Sr." <[EMAIL PROTECTED]> wrote: > >The developers are people and you will get a lot > > further if you treat them that way. > > LIES! They

Re: Cake 1.2 isUnique validation

2007-11-29 Thread José Pablo Orozco Marín
Maybe this help: http://tempdocs.cakephp.org/#TOC121845 array( 'rule' => array('checkUnique'), 'message' => 'Login name already taken.' ) ); function checkUnique($data) { $valid = false; if(isset($fieldName) && $this->hasField($fieldN

Re: Update gone wrong.

2007-11-29 Thread Mech7
Does anybody allready solve this? even with a total new setup this problems still occurs.. i opened a ticket but it was closed because not enough info? But really how can i provide more if i don't know what is the problem :| --~--~-~--~~~---~--~~ You received this m

Re: bake function, Fatal Error, Call to undefined function mysql_connect()...

2007-11-29 Thread lynch
So how do i enable the mysql module for cli? I have no idea... is it in the dynamic extensions part in the cli php.ini? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send em

Re: bake function, Fatal Error, Call to undefined function mysql_connect()...

2007-11-29 Thread Martin Wood-Mitrovski
lynch wrote: > What do you mean with command line php? Sorry this is all new to me, > could you give me a hint. on linux there are seperate configurations for php when it runs via the webserver and from when it runs via the command line (i.e. the bake script) on my linux box (gentoo) i have t

Re: including javascript file in default layout

2007-11-29 Thread Thrilller
use echo $javascript->link('functions'); not echo $javascript->link('functions.js'); i hope this will solve ure problem On Nov 29, 6:51 pm, sMAshdot <[EMAIL PROTECTED]> wrote: > Hello! > > I have added the Javascript Helper to the $helpers array in my > controller, > and have a file

Re: Cake 1.2 isUnique validation

2007-11-29 Thread RichardAtHome
Ahh, thank you very much Mr Tufty. Another piece of the Cake puzzle slides into place :-) On Nov 29, 4:28 pm, MrTufty <[EMAIL PROTECTED]> wrote: > And is entirely wrong... well, no, it'll work, but it doesn't take > advantage of CakePHP 1.2 validation. The IBM tutorials are good, but > outdated n

Re: Cake 1.2 isUnique validation

2007-11-29 Thread francky06l
Take care when using with edit. Indeed you can edit your data, not modifying the field but the field will exist in the DB (the current record)... On Nov 29, 7:54 pm, José Pablo Orozco Marín <[EMAIL PROTECTED]> wrote: > Maybe this help:http://tempdocs.cakephp.org/#TOC121845 > > class User extends

Get a hasAndBelongsToMany colection a controller

2007-11-29 Thread bibi
I have a model witch use a hasAndBelongsToMany collection class User extends AppModel { var $hasAndBelongsToMany = array( 'Photo' => array('className' => 'Photo', 'joinTable' => 'photo_users', 'associationForeignKey' => 'User_id', 'foreignKey' => 'Photo_id', 'unique'

Re: Update gone wrong.

2007-11-29 Thread Chris Hartjes
On Nov 29, 2007 11:55 AM, Mech7 <[EMAIL PROTECTED]> wrote: > > Does anybody allready solve this? even with a total new setup this > problems still occurs.. i opened a ticket but it was closed because > not enough info? But really how can i provide more if i don't know > what is the problem :| I h

Re: Intermittent Blank Screen

2007-11-29 Thread oozo
I have the same problem. Did you find an answer Thanks On Oct 31, 9:26 pm, lemp <[EMAIL PROTECTED]> wrote: > I am building an application with Cake 1.2.0.5875 pre-beta and I use > Firefox 2.0.0.8 for testing. > > I'm at debug level 2 and I use Auth and Acl (in app_controller) > > >From time

Re: Cake 1.2 isUnique validation

2007-11-29 Thread Ivolution
Alternatively (and better because reusable in other Models), you could insert the function _isUnique (documented below) in your own app_model.php and use the following code in your Model. Second argument in the 'rule' array is the field that has to be checked for uniqueness.. var $validate = arr

othAuth issue, believe begins with auto_redirect

2007-11-29 Thread clrockwell
Hello, I am implementing othAuth and run into issues when using $auto_redirect = true; please note that after each test, I clear cache and cookies, then test again. 1st situation: $auto_redirect = true with proper credentials, can login in fine at user/login and directs to correct page (withou

Re: How do I access variables set in App Controller in View?

2007-11-29 Thread skoggins
Thanks! That was a very helpful explanation. On Nov 28, 6:57 pm, Grant Cox <[EMAIL PROTECTED]> wrote: > Because your app controller is attempting to access the User model. > Models are not loaded by default - only if they are included in the > $uses array of a controller (or, if they are the pri

Paginating search results, keeping search criteria, and not messing with the view

2007-11-29 Thread loki_mdog
Hey Folks, I have got paginating search results working...PERFECTLY!!! Took me long enough...anyway, I would like the have the pagination remember the filter terms (as it currently does) without having to make any modifications to the view. The code is here and listed a cakephp's bin (URL below

Re: Search box

2007-11-29 Thread sendami
I got an error message like below. Fatal error: Call to undefined method Sanitize::clean() in C:\AppServ \www\app\controllers\cms_categories_controller.php on line 18 ant the line 18 is below. $this->cleanData = $sanitize->clean( $this->data ); What I have to do? On Nov 27, 5:26 pm, Josoroma

Re: Paginating search results, keeping search criteria, and not messing with the view

2007-11-29 Thread AD7six
On Nov 29, 7:52 pm, loki_mdog <[EMAIL PROTECTED]> wrote: > Hey Folks, I have got paginating search results working...PERFECTLY!!! Took > me long enough...anyway, I would like the have the pagination remember the > filter terms (as it currently does) without having to make any modifications > to

Re: Beginner Model help!

2007-11-29 Thread Lauwens
Seems not... as my problem was the Oracle after all!! Installed a Mysql test db to test it all out and worked flawlessly, so i know the oci file had to be the root of my problem! Changed the dbo driver to the one included in the 1.2-pre-beta ... Poof error's gone! On Nov 29, 4:51 am, powtac <[E

Re: Search box

2007-11-29 Thread Chris Hartjes
On Nov 29, 2007 2:20 PM, sendami <[EMAIL PROTECTED]> wrote: > > I got an error message like below. > > Fatal error: Call to undefined method Sanitize::clean() in C:\AppServ > \www\app\controllers\cms_categories_controller.php on line 18 > > ant the line 18 is below. > > $this->cleanData = $saniti

Navigation set up? (newbie)

2007-11-29 Thread powtac
How can I set up a navigation? --~--~-~--~~~---~--~~ 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 PROT

Re: How do I access variables set in App Controller in View?

2007-11-29 Thread skoggins
How do I set the $user variable in the app controller so it is accessible in other controllers ? Tried $user = $this->User->findById($this->Session- >read('User.id')); but that didn't work. --~--~-~--~~~---~--~~ You received this message because you are subscri

Re: How do I access variables set in App Controller in View?

2007-11-29 Thread Chris Hartjes
On Nov 29, 2007 2:54 PM, skoggins <[EMAIL PROTECTED]> wrote: > > How do I set the $user variable in the app controller so it is > accessible in other controllers ? > > Tried $user = $this->User->findById($this->Session- > >read('User.id')); but that didn't work. Config::write(...) and then C

Re: Navigation set up? (newbie)

2007-11-29 Thread Samuel DeVore
I prefer a sextant and a sundial On Nov 29, 2007 12:11 PM, powtac <[EMAIL PROTECTED]> wrote: > > How can I set up a navigation? > > > -- (the old fart) the advice is free, the lack of crankiness will cost you - its a fine line between a real question and an idiot http://blog.samdevore.com/a

How to capture validation errors? (what variable are they stored in?)

2007-11-29 Thread Action
I'm using form helper and I have my validation error messages defined in my model, so the error messages are automatically displayed next to the invalid field in the form. However, I want to submit and validate the form using ajax (jquery). How can I access the validation errors (what variable ar

Re: How to capture validation errors? (what variable are they stored in?)

2007-11-29 Thread Chris Hartjes
On Nov 29, 2007 3:12 PM, Action <[EMAIL PROTECTED]> wrote: > > I'm using form helper and I have my validation error messages defined > in my model, so the error messages are automatically displayed next to > the invalid field in the form. > > However, I want to submit and validate the form using a

Re: How to capture validation errors? (what variable are they stored in?)

2007-11-29 Thread Action
That doesn't help. I know how to set validation rules in errors. My question is, how do I manually output those errors when a field invalidates? For example, if the username field invalidates, what variable stores the error message I defined in model so that I can manually output it in the view? I

Re: How to capture validation errors? (what variable are they stored in?)

2007-11-29 Thread Chris Hartjes
On Nov 29, 2007 3:21 PM, Action <[EMAIL PROTECTED]> wrote: > > That doesn't help. I know how to set validation rules in errors. My > question is, how do I manually output those errors when a field > invalidates? For example, if the username field invalidates, what > variable stores the error messa

Best practices for organizing tables?

2007-11-29 Thread BravoFoxtrot
What are the best practices for organizing tables? My scenario is that I want to have a number of common tables and then create a number of modules (plugins) that share the common tables. I would like to keep the plugin tables organized in some way. For example I have the following common table

Re: How do I access variables set in App Controller in View?

2007-11-29 Thread skoggins
Sorry, I'm a newbie. I tried the code like this: App Controller function beforeRender() { if($this->Session->check('User')){ $this->set('user', $this->User->findById($this->Session- >read('User.id'))); Config::writ

Re: How to capture validation errors? (what variable are they stored in?)

2007-11-29 Thread Chris Hartjes
On Nov 29, 2007 3:33 PM, Action <[EMAIL PROTECTED]> wrote: > > That's pretty much how it's been every step of the way. As powerful as > this framework is, it's becoming too much of a pain in the ass to > figure out how to do things with out proper documentation...thus > defeating the originally pu

Re: How to capture validation errors? (what variable are they stored in?)

2007-11-29 Thread Action
That's pretty much how it's been every step of the way. As powerful as this framework is, it's becoming too much of a pain in the ass to figure out how to do things with out proper documentation...thus defeating the originally purpose of a framework: speeding up development. I've been toying with

Re: Navigation set up? (newbie)

2007-11-29 Thread powtac
Hi Samuel, Im sorry but I took already some time to search the API, Manual, Bakery but didnt found anything for the following reasons: API: no hint for something like navigation Manual: not possible to search (http://cakephp.org/search? q=navigation), search is broken Bakery: no real result, sear

Re: How to capture validation errors? (what variable are they stored in?)

2007-11-29 Thread francky06l
You can use $this->Model->validationErrors that will contain fields in error. I also something like this with Ajax, actually I set this array to my view, and I use the array to insert some "message" into the Dom.. In controller : if(!$this->model->save()) { $this->set('haserrors', $this->Mod

Re: Navigation set up? (newbie)

2007-11-29 Thread Samuel DeVore
Your problem is that you are asking a bad question. You give no context, your question showed no effort and really you asked nothing. How are we supposed to even know where to start to help you. Do you know basic HTML? no way to know. Try asking a question like... I am looking for help creatin

Re: Navigation set up? (newbie)

2007-11-29 Thread Jon Molesa
*On Thu, Nov 29, 2007 at 12:46:10PM -0800 powtac <[EMAIL PROTECTED]> wrote: > Date: Thu, 29 Nov 2007 12:46:10 -0800 (PST) > From: powtac <[EMAIL PROTECTED]> > Subject: Re: Navigation set up? (newbie) > To: Cake PHP > > > Hi Samuel, > Im sorry but I took already some time to search the API, Man

Re: How to capture validation errors? (what variable are they stored in?)

2007-11-29 Thread Chris Hartjes
On Nov 29, 2007 3:48 PM, Action <[EMAIL PROTECTED]> wrote: > > What do you dislike about CI? I've only sifted through the user > guide...never actually used it. The lack of integrated CRUD and table > associations in CI made me originally choose Cake. But I feel like > I've wasted a lot much time

Re: How to capture validation errors? (what variable are they stored in?)

2007-11-29 Thread Action
I tried your method but $this->Model->validationErrors just returns an empty array...even if there are errors. Controller: $this->set('haserrors', $this->Comment->validationErrors); View: print_r($haserrors); On Nov 29, 3:47 pm, francky06l <[EMAIL PROTECTED]> wrote: > You can use $this->Model

Re: Navigation set up? (newbie)

2007-11-29 Thread powtac
Thanx for your answer! For me as a cakePHP newbie (second day) it is very important to get the basic questions answered (to become a cakePHP fan, or not). In my opinion it is very important for a growing comunity to answer also silly questions. And I will do my work to answer others questions too.

Re: How to capture validation errors? (what variable are they stored in?)

2007-11-29 Thread Action
What do you dislike about CI? I've only sifted through the user guide...never actually used it. The lack of integrated CRUD and table associations in CI made me originally choose Cake. But I feel like I've wasted a lot much time learning Cake searching for random bits of documentation and tutorial

Re: How to capture validation errors? (what variable are they stored in?)

2007-11-29 Thread Action
Nevermind, it works now. On Nov 29, 4:10 pm, Action <[EMAIL PROTECTED]> wrote: > I tried your method but $this->Model->validationErrors just returns an > empty array...even if there are errors. > > Controller: > > $this->set('haserrors', $this->Comment->validationErrors); > > View: > > print_r($h

Re: How to capture validation errors? (what variable are they stored in?)

2007-11-29 Thread francky06l
$this->Model->validationErrors works for me and contains the errors Something is wrong... On Nov 29, 10:21 pm, Action <[EMAIL PROTECTED]> wrote: > Nevermind, it works now. > > On Nov 29, 4:10 pm, Action <[EMAIL PROTECTED]> wrote: > > > I tried your method but $this->Model->validationErrors

Re: Paginating search results, keeping search criteria, and not messing with the view

2007-11-29 Thread loki_mdog
It's not that I am against it and I will use this line if I have to but it doesn't make sense to me to include it in the view. I am defining everything else about the pagination in the controller (including my filtering logic)...seems to make sense to me that I should be able to retain that filt

Re: Navigation set up? (newbie)

2007-11-29 Thread powtac
lol, I found my own question on this group in google: http://www.google.com/search?q=cakephp%20navigation, only 2 hours later! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, s

Re: Navigation set up? (newbie)

2007-11-29 Thread Chris Hartjes
On Nov 29, 2007 4:13 PM, powtac <[EMAIL PROTECTED]> wrote: > In germany there is a speech: "There is no silly question, only a > silly answer". There is also another saying: "Build a fire for someone and they are warm for one night. Set them on fire and they are warm for the rest of their life."

Re: How to capture validation errors? (what variable are they stored in?)

2007-11-29 Thread Action
Yeah it works now. Thanks for the help. I was using a component that allowed me to validate the data in a different controller and display the errors in a different view using a session. That's what was messing things up. It worked once I stopped using the component. On Nov 29, 4:31 pm, francky0

Re: Search box

2007-11-29 Thread José Pablo Orozco Marín
Which version of cakephp are you using? Normally for me works the following 3 lines of code using cakephp 1.2 uses('sanitize'); $sanitize = new Sanitize(); $this->cleanData = $sanitize->clean( $this->data ); sendami escribió: > I got an error message like below. > > Fatal erro

Re: Intermittent Blank Screen

2007-11-29 Thread powtac
http://groups.google.com/group/cake-php/browse_frm/thread/889295952424caf9 --~--~-~--~~~---~--~~ 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 unsubscrib

Re: why am I getting this "undefined index" error?

2007-11-29 Thread Luke
nobody? On Nov 28, 10:41 am, Luke <[EMAIL PROTECTED]> wrote: > I am trying to set up associations between my orders model and my > orderitems model. It seems to be working except for this error I'm > getting. What am I doing wrong? (see screenshot below) > > Here are my models: > > class OrderIt

Re: Getting 404 error after moving to production server

2007-11-29 Thread Rohit
Hi, I tried to run the application using IIS as well, and even IIS returned 404 error, which seems to indicate that the problem is with the .htaccess file. I will try all the suggestions, and let you know the outcome. Thank you all. Rohit On Nov 29, 5:50 pm, zonium <[EMAIL PROTECTED]> wrote: > R

multiple "hasMany"?

2007-11-29 Thread Luke
Does cake not allow multiple "hasMany" associations? for some reason it is only rendering scaffolding for the first of the two I'm putting in here: class Order extends AppModel { var $name = 'Order'; var $hasMany = array( 'OrderNote' => array(

Re: Best practices for organizing tables?

2007-11-29 Thread Grant Cox
I'm not familiar with Postgres or schemas, but I think a prefix is suitable. The table name does not need to affect the MVC names - just set var $useTable = 'whatever_long_table_name' in your model. On Nov 30, 6:33 am, BravoFoxtrot <[EMAIL PROTECTED]> wrote: > What are the best practices for or

Re: Default Admin Routing for Forms in 1.2 Pre Beta

2007-11-29 Thread [EMAIL PROTECTED]
I had the same problem, update you core cakephp code with the branch or nightly. That should solve the problem. CSdread On Nov 29, 9:10 am, Bruno Bergher <[EMAIL PROTECTED]> wrote: > Hi everyone! > > We just moved an application we developed in 1.2.0.5427 alpha to the > latest pre beta release.

Can I use model class independently?

2007-11-29 Thread Takuo Shiono
Hi. I am a new member of this group. So please forgive me if I do not know the common view of this group. Now I am trying to use cakePHP model classes independently. I have to use our original framework which do not have OR mapping. I am very happy if I can use cakePHP for OR mapping in the form

Re: bake function, Fatal Error, Call to undefined function mysql_connect()...

2007-11-29 Thread lynch
Oh damn, i think we started to write the post at the same time and i overlooked your post. My cli path is etc/php5/cli/php.ini and i am using Suse Linux 10.1. I already added the extension=mysql.so line, but it didnt work. So i looked at the extension Path and i rembered, that i installed a new

Re: Default Admin Routing for Forms in 1.2 Pre Beta

2007-11-29 Thread Kalileo
I have suffered the same problems, but fear not, they are solved: There have been a few bugs which are all been fixed in the meantime. These fixes are already in the svn. Not in trunk though, but in branches. Take that and it will work again. If you have a modern OS, such as Linux, do something

Re: bake function, Fatal Error, Call to undefined function mysql_connect()...

2007-11-29 Thread lynch
Its four o´clock in the morning an i am still on it... I tried the php -v command and it says: PHP 4.4.0 (cli) (built: Dec 10 2005 15:39:24) Copyright (c) 1997-2004 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies PHP 4.4.0 although i installed PHP 5.2.5 and my phpinf

Re: why am I getting this "undefined index" error?

2007-11-29 Thread powtac
I had the same "Undefined index..." error. After I changed some things manualy at the database. But when I bake the model again it was resolved. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To pos

Re: Don't see related tables in view (newbie)

2007-11-29 Thread powtac
Found the resolution of "sigular_id or plural_id" in the german wikipedia article: * Model: User, Group (Singular) * Controller: UsersController, GroupsController (Plural) * Datenbanktabelle: users, groups, groups_users (Plural, letztes Beispiel zeigt den Namen für eine Relationstabell

Re: Can I use model class independently?

2007-11-29 Thread Chris Hartjes
On Nov 29, 2007 9:15 PM, Takuo Shiono <[EMAIL PROTECTED]> wrote: > Do you have any idea for using model independently? It's too tied into the framework itself to be used independently. I suggest using something Propel (http://propel.phpdb.org/trac/) if you want to add ORM to an existing project.

Re: bake function, Fatal Error, Call to undefined function mysql_connect()...

2007-11-29 Thread Chris Hartjes
On Nov 29, 2007 10:14 PM, lynch <[EMAIL PROTECTED]> wrote: > > Its four o´clock in the morning an i am still on it... > > I tried the php -v command and it says: > > PHP 4.4.0 (cli) (built: Dec 10 2005 15:39:24) > Copyright (c) 1997-2004 The PHP Group > Zend Engine v1.3.0, Copyright (c) 1998-2004

Re: Cake 1.2 isUnique validation

2007-11-29 Thread RichardAtHome
Thanks for the additional feedback. I'd already discovered the 'edit' gotcha and created a workaround similar to Involution's. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group,

Re: cake + php5 = bad performance?

2007-11-29 Thread bingo
hi powtac, what do you mean by hard object oriented code ?? On Nov 29, 10:25 am, powtac <[EMAIL PROTECTED]> wrote: > We did some benchmarks (not with cake) and figured out, that hard > objectorientated code in PHP5 is slower than PHP4! --~--~-~--~~~---~--~~ You re

Re: How to capture validation errors? (what variable are they stored in?)

2007-11-29 Thread abba bryant
To the original author. I went through this *exact* same situation. I was using the form plugin to validate and submit forms. The first approach I took was to move the form to an element. If the request is an ajax request *only* the element gets rendered. I use the same element in the non-ajax

Re: why am I getting this "undefined index" error?

2007-11-29 Thread Kyo
Those errors won't get you into any trouble in reality. If you want to remove them, just try something like this in your view: --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this gr