SaveField ignores the input field name :-(

2007-12-07 Thread bingo
hi, yesterday I download the latest version of CakePHP (1.2.0.5875 pre- beta) and since then my code is broken. The problem is with the SaveField. I am using othAuth authentication and has this piece of code to update last_visit field if(isset($this->user_table_last_visit)){ $UserModel-

Re: Model Association 'limit' not working

2007-12-07 Thread sanderken
People looking for the answer to " defining limit row in oracle " : in the model , use the 'conditions' => ' WHERE ROWNUM <= 3 ' option. Limit is the implementation in mySQL. Hope this helps someone... On 8 dec, 01:53, sanderken <[EMAIL PROTECTED]> wrote: > Maybe I should mention I'm us

Re: Anyone up for a 1.2 query construction challenge?

2007-12-07 Thread kiger
@grigri I suck as sql but I gave it my best and I found a sql statement do accomplish the counting! SELECT Place.id, CONCAT(Place.name, ' (', COUNT(*), ')') AS name, Place.state FROM Hobby JOIN Person ON Hobby.id = Person.hobby_id JOIN Place ON Person.place_id = Place.id WHERE Hobby.name LIKE '%f

Re: Model Association 'limit' not working

2007-12-07 Thread sanderken
Maybe I should mention I'm using oracle for DBMS. On 7 dec, 21:54, sanderken <[EMAIL PROTECTED]> wrote: > Hey, > > I defined a "user" (named Gebruiker in my native language ) model > where when I call a $this->find() , needs to retrieve only a limited > amount of related information. > > When I a

Re: Dbdesigner :: hasAndBelongsToMany ER example

2007-12-07 Thread powtac
Hi zonium, a general question: in't it required to set up both "directions"? This is something I never understood! Simon On 7 Dez., 22:18, zonium <[EMAIL PROTECTED]> wrote: > I think your diagram is correct academically. > > For implementation using cake, I usually just need to specify one of >

Re: Dbdesigner :: hasAndBelongsToMany ER example

2007-12-07 Thread zonium
I think your diagram is correct academically. For implementation using cake, I usually just need to specify one of the 2 associations: User HasAndBelongsToMany Projects or Projects HasAndBelongsToMany Users Because any one of these already represents the linkage between the 2 model (User and P

Model Association 'limit' not working

2007-12-07 Thread sanderken
Hey, I defined a "user" (named Gebruiker in my native language ) model where when I call a $this->find() , needs to retrieve only a limited amount of related information. When I add the 'limit' => '10' to the association info, it doesn't work. For example: I call $gebruiker = $this->find(

findby for cake 1.2

2007-12-07 Thread oracle411
I thought I read somewhere that their is a new way that cakePHP does findby.. This is how I did it the old way. $this->controller->Signup->findByConfirmCode($confirmCode) Is their a better way to do it with 1.2? Thanks --~--~-~--~~~---~--~~ You received this me

Re: CLOB in cakephp 1.2

2007-12-07 Thread sanderken
Hello Lauwens, What a coincidance, yes :) I'm still trying to bind the >4000 string from php to the CLOB field. I manage to READ the data ( I manually put into the database ) with no problem, I just can't push the data back into the database. I read about the ticket, the solution lies there inde

Creating an index page

2007-12-07 Thread [EMAIL PROTECTED]
I'm starting to toy with CakePHP and while I've gone over the tutorials I could find I can't seem to locate this information. I want to be able to hit my site http://www.mydomain.com/directory and am trying to get it to hit an index page, so effectively index.php as if I was creating scripts in my

Re: Adding new routes from a controller. (Cake 1.2)

2007-12-07 Thread Chris Hawes
Ok, I've cracked it, I have put the code in the applications app/ config/routes.php file. The code is as follows: $Configure =& Configure::getInstance(); $Folder =& new Folder(); $Folder->cd($Configure->pluginPaths[0]); $plugins = $Folder->ls(); foreach (

Adding new routes from a controller. (Cake 1.2)

2007-12-07 Thread Chris Hawes
Hello, The application I am currently developing will make the use of plugins. Currently in the app/app_controller.php beforeFilter (which is probably the wrong place) I get a list of plugins. I then check to see if a config file exists for the plugin, and execute the file. I would also like to

Re: Dbdesigner :: hasAndBelongsToMany ER example

2007-12-07 Thread Josoroma
You must to copy and paste the url in the browser: http://www.sukialogic.com/cakephp/screen_capture/dbdesigner_habtm.png Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group

Re: Dbdesigner :: hasAndBelongsToMany ER example

2007-12-07 Thread José Pablo Orozco Marín
Ok! I think that i found the answer: http://it.swantafe.wa.edu.au/index.php?option=com_content&task=view&id=105&Itemid=49 Im doing this ER right? Screen capture of HABTM using DbDesigner: http://www.sukialogic.com/cakephp/screen_capture/dbdesigner_habtm.png Any comment is welcome. Thanks. --

RE: Username availabilty check

2007-12-07 Thread Jason Burgess
I've had pretty good luck doing it this way. Below are the important snippets of code. I've left off the actual checking code since that is very specific to my application. You can see it in action here: http://www.area50four.com/signup >From the Signup page: input("User/username", array('on

Re: Latest additions to 1.2

2007-12-07 Thread Aaron Shafovaloff
I figured everything out. I'm an idiot :-) On Dec 7, 10:24 am, Aaron Shafovaloff <[EMAIL PROTECTED]> wrote: > Using latest SVN I get: > > Fatal error: Call to undefined method ClassRegistry::init() > > On Dec 7, 6:00 am, francky06l <[EMAIL PROTECTED]> wrote: > > > ClassRegistry::init('plugin.mod

RE: Using PHP 5 Functionality In Your App

2007-12-07 Thread Jason Burgess
For the sites we're doing, we've switched to using PHP5. Since the software isn't going to be released we weren't worried about anyone trying to run it using PHP4. About 6 or 8 months ago, when we started adding support for users to see times in their local time zone, I started looking for solut

Re: ACL on different database

2007-12-07 Thread AD7six
On Dec 7, 6:38 pm, shifaz <[EMAIL PROTECTED]> wrote: > Thanks Samuel for the quick response and i would use this method if I > have no other options, I would really like to know how this can be > done the other way round. I wonder what that does: https://trac.cakephp.org/browser/branches/1.2.x.

Dbdesigner :: hasAndBelongsToMany ER example

2007-12-07 Thread Josoroma
Hi! Im stuck trying to undersatnd how to represent hasAndBelongsToMany using DbDesginer. -- hasOne 1:1 belongsTo 1:1 hasMany 1:n HasAndBelongsToMany ¿ ? --

Re: Latest additions to 1.2

2007-12-07 Thread Aaron Shafovaloff
I went back to trying loadModel and it's weird, on two different machines I have the same SVN updates of cake and my app. I've triple- checked this. But on one machine I get: Warning (512): loadModel is deprecated see App::import('Model', 'ModelName'); [CORE\cake\basics.php, line 1036] And on t

Re: ACL on different database

2007-12-07 Thread shifaz
Thanks Samuel for the quick response and i would use this method if I have no other options, I would really like to know how this can be done the other way round. On Dec 7, 10:02 pm, "Samuel DeVore" <[EMAIL PROTECTED]> wrote: > you could have all your code go the $useDbConfig route and let ACL >

Re: Using PHP 5 Functionality In Your App

2007-12-07 Thread Sliv
@Walker: I guess I was thinking more along the lines of new functionality that some developers may want to take advantage of and are willing to give up backwards compatibility in their app to do it. By "share their experiences", I guess I was looking for feedback on examples of such functionality

Re: Latest additions to 1.2

2007-12-07 Thread Aaron Shafovaloff
Using latest SVN I get: Fatal error: Call to undefined method ClassRegistry::init() On Dec 7, 6:00 am, francky06l <[EMAIL PROTECTED]> wrote: > ClassRegistry::init('plugin.modelname'); should work. > > On Dec 6, 10:49 pm, Aaron Shafovaloff <[EMAIL PROTECTED]> wrote: > > > Ahhh specifically it wo

Re: ACL on different database

2007-12-07 Thread Samuel DeVore
you could have all your code go the $useDbConfig route and let ACL stuff use the default On Dec 7, 2007 9:50 AM, shifaz <[EMAIL PROTECTED]> wrote: > > I want to use the ACL feature on cake and would like how i can > configure cake to use the acl table on a different database (which i > can

ACL on different database

2007-12-07 Thread shifaz
I want to use the ACL feature on cake and would like how i can configure cake to use the acl table on a different database (which i can have read/write access). The default database connection on cake config uses a read-only database, I wont be able to create any additional tables on it. I'm awar

Re: User Defined Fields

2007-12-07 Thread Serge Rodovnichenko
You need an additional table with user fileds: id, user_id, fieldname, fieldvalue. User hasMany UserDefinedFields. On Dec 7, 4:17 pm, JTTACJ1 <[EMAIL PROTECTED]> wrote: > What is the best strategy for allowing application users to define > database fields on the fly? > > For example in a customer

Anybody Having a UserName Check script using Ajax

2007-12-07 Thread As
Hi I am new to cakephp.I need to check whether a user is already avalable in database using Ajax.Is there any one did the username check script in cakephp using ajax and prototype library? If not help me providing the basic idea. Thanks Janet --~--~-~--~~~---~--~

Re: Nested Categories Problem

2007-12-07 Thread Serge Rodovnichenko
TreeBehaviour uses a Nested Sets pattern, unlike conventional parent- child pattern, used in your schema. More about various patterns of SQL- trees: http://www.dbazine.com/oracle/or-articles/tropashko4 You need a 3 fields to use with TreeBehaviour: 'parent', 'lft', 'rgt'. Remember, that Nested Se

need xhtml and css designer with Cake experience

2007-12-07 Thread [EMAIL PROTECTED]
Hey Cake Users and Developers, I co-own a web development company in the Chicagoland area and we are strictly a CakePHP shop. We are in severe need of a talented designer with solid xhtml/css skills and preferably some Cake experience. We are trying many placed to find someone, but having troub

Re: CLOB in cakephp 1.2

2007-12-07 Thread Lauwens
I am trying to do the exact same thing (what a coincidance) I only found a ticket with a patch about this here: https://trac.cakephp.org/ticket/2294 But that doesn't seem to do the trick... Maybe we can get in contact with cedsav for our problem ? On 5 dec, 01:28, sanderken <[EMAIL PROTECTED

Re: How to "INNER Join" in Model ?

2007-12-07 Thread Baz
Didn't work for me. On Dec 7, 2007 8:47 AM, foxmask <[EMAIL PROTECTED]> wrote: > > Nice ! > > > On Dec 6, 10:48 pm, nate <[EMAIL PROTECTED]> wrote: > > > class ForumPerm extends AppModel { > > var $name = 'ForumPerm'; > > var $primaryKey = 'group_id,forum_id'; > > //The A

Re: Anyone up for a 1.2 query construction challenge?

2007-12-07 Thread grigri
I've only just noticed that there is indeed a group parameter for Set::combine(). So you could quite easily do $people = $this->Person->find( 'all', array( 'conditions' =>array('Hobby.name' => $keywords), 'recursive' => 0 ) ); $placesList = Set::combine($people, '{n}.Place.id', '{n

Re: Anyone up for a 1.2 query construction challenge?

2007-12-07 Thread djiize
there is an argument for generateList that group your result by state: $places_list= $this->Hobby->Place->generateList(null, 'name ASC', null, null, null, '{n}.Place.state'); and with a little post-processing, you'll have counts: foreach ($places_list as $state => $places) { foreach ($place

Re: How to "INNER Join" in Model ?

2007-12-07 Thread foxmask
Nice ! On Dec 6, 10:48 pm, nate <[EMAIL PROTECTED]> wrote: > class ForumPerm extends AppModel { > var $name = 'ForumPerm'; > var $primaryKey = 'group_id,forum_id'; > //The Associations below have been created with all possible > keys, > those that are not needed can be r

Username availabilty check

2007-12-07 Thread Anoop
Hi All , Can anyone provide me a username availability check script using ajax helper of cake php.. I am facing the problem that in ajax->link I am not able to get the username , the user just placed into the form. link('check',"Check",array( 'url'=>"/registration/ checkUserExists/", 'update'=>"

Re: Anyone up for a 1.2 query construction challenge?

2007-12-07 Thread kiger
Thanks for the tips. I guess I'll just use what you wrote until I run into performance issues. There is a method in form helper I believe which groups based on a specific path, but it doesn't count up a total for you or anything intricate like that. Oh well. --~--~-~--~~~-

User Defined Fields

2007-12-07 Thread JTTACJ1
What is the best strategy for allowing application users to define database fields on the fly? For example in a customer database you would have customer name, address and address. One company might want to include some grouping fields so they add a User Defined Field called CustomerType. This

Re: Using PHP 5 Functionality In Your App

2007-12-07 Thread Mech7
Personally i don't care for php4 anmyore.. most hosting offer now php5 anyway.. also i think this year support will be dropped for it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this

Re: Latest additions to 1.2

2007-12-07 Thread francky06l
ClassRegistry::init('plugin.modelname'); should work. On Dec 6, 10:49 pm, Aaron Shafovaloff <[EMAIL PROTECTED]> wrote: > Ahhh specifically it works when you manually do an import, but you > can't yet use dot notation with "uses" at the top of your controller. > > On Nov 17, 9:17 pm, Gwoo <[EMAIL

Re: Anyone up for a 1.2 query construction challenge?

2007-12-07 Thread grigri
Well, whatever you do, Cake won't "categorize" your results by state for you, so you'll end up having the post-processing loop anyway. (Unless there is some functionality for this hidden away somewhere - it would come in handy). Efficiency is only worth worrying about when it becomes an issue, im

Re: Anyone up for a 1.2 query construction challenge?

2007-12-07 Thread kiger
@AD7six Sorry I was unable to eloquate myself clearer. What I wanted to do was kind of hard to explain. @grigri Thanks for wrapping your head around this. Your second guess was correct, in that I already have the keywords inputted. I have yet to learn AJAX. Your solution is spot on to what I hav

Ajax - Render and findAll

2007-12-07 Thread DanielV
Hello, I have a application that displays 3 group of objects. Using Ajax I've made every object draggable, and each of the 3 groups a droppable element using ajax->drag and ajax->dropRemote respectively. I've made it so when the user drags an object and drops it in a group it calls an action 'aja

Re: Anyone up for a 1.2 query construction challenge?

2007-12-07 Thread grigri
I'm confused at what you mean in the dropdown - are both the "keywords" textfield and "places" dropdown on the same form? In that case, you can't get the number of people to display on each option, because that information would be dependant on the keywords. The only way to do that would be throu

Re: Obtain all elements of multiple select

2007-12-07 Thread Serge Rodovnichenko
Try to set/reset a 'selected' attribute of OPTION when moving options between two lists. On Dec 6, 9:19 pm, dandreta <[EMAIL PROTECTED]> wrote: > I have an HABTM relation between ModelA and ModelB. > In the add view of A, I have created two lists, one with all B > elements of the database and ot

Re: Using PHP 5 Functionality In Your App

2007-12-07 Thread Marcin Domanski aka kabturek
http://www.gophp5.org/ :) On Dec 6, 7:22 pm, Sliv <[EMAIL PROTECTED]> wrote: > I was wondering if developers out there who are writing CakePHP apps > in a PHP 5 environment are using PHP 5 functionality in their app(s) > or are choosing to stick with functionality available in 4 or 5? > > Since C

Re: Getting a list of available models

2007-12-07 Thread AD7six
On Dec 7, 6:39 am, 7elephants <[EMAIL PROTECTED]> wrote: > Does anybody know if there is a already available method for getting > the list of available models within a component and/or controller? > > Thank you in advance. Check the api, depends on your version of cake $models = loadModels();

Re: Anyone up for a 1.2 query construction challenge?

2007-12-07 Thread AD7six
On Dec 7, 2:53 am, kiger <[EMAIL PROTECTED]> wrote: > EDIT: I figured out a better way to describe step 3c)... > > For each 'Place.name' I count up the number of people having a > 'Hobby.name' matching the selected keywords. I display this total in > parenthesis after the name of the place (e.g.

Re: Flash message not displaying across controllers

2007-12-07 Thread AD7six
On Dec 7, 2:46 am, skoggins <[EMAIL PROTECTED]> wrote: > Hi all, > > I have a Flash message that doesn't seem to be displaying across > controllers. It is called in the beforeFilter of my accounts > controller: > > function __validateLoginStatus() > { > //no exce