How to retrieve tree data from the result fo findAllThreaded() query?

2006-08-29 Thread Fasthold
Hi all, I execute the findAllThreaded() method, and its result like these below: Array ( [0] => Array ( [Area] => Array ( [id] => 1 [name] => Cake1 [parent_id] => 0 )

Re: Production setup on a shared hosting account

2006-08-29 Thread Pradeep
Hi, Thanks for the replies. I accidentally messed up my domain trying to configure cake. I will try to use suggestions provided by you over this weekend and will get back if I face some problems. Thanks again for the help. -- Pradeep Chandiramani http://chandiramani.info --~--~-~--~-

Re: Using a model for multiple tables

2006-08-29 Thread Bret Kuhns
Yes John, I know what the AppModel is. But my idea is that instead of clogging your AppModel full of specific stuff that applies to only the few tables that Kabuto is talking about in this topic, you create a "container" model (that extends the AppModel for *application-wide* code) that holds the

Re: Using a model for multiple tables

2006-08-29 Thread John David Anderson (_psychic_)
On Aug 29, 2006, at 7:36 PM, Bret Kuhns wrote: > > I've never done this before so I have no idea how cake itself would > handle it (if someone knows for sure, please chime in), but because > models are objects that extend the AppModel, you could create a > generic > model object that extends A

Re: Using a model for multiple tables

2006-08-29 Thread Bret Kuhns
I've never done this before so I have no idea how cake itself would handle it (if someone knows for sure, please chime in), but because models are objects that extend the AppModel, you could create a generic model object that extends AppModel which provides the generic structure of your multiple d

Re: Oracle 9i with CakePHP

2006-08-29 Thread Chris Hartjes
I don't have any experience with ADODb, so I can't help with that part. :( On 8/29/06, fperini <[EMAIL PROTECTED]> wrote: > > I am with this problem has some suggestion? > > Fatal error: Call to a member function MetaType() on a non-object in > c:\program files\apache > group\Apache\htdocs\cake\c

Re: Oracle 9i with CakePHP

2006-08-29 Thread fperini
I am with this problem has some suggestion? Fatal error: Call to a member function MetaType() on a non-object in c:\program files\apache group\Apache\htdocs\cake\cake\libs\model\dbo\dbo_ADODB.php on line 296 I have ADOdb installed in /vendors. My archive of configuration of database is this:

Re: Oracle 9i with CakePHP

2006-08-29 Thread Chris Hartjes
ADOdb has support for Oracle, so you'll have to configure Cake's database stuff to use ADOdb. http://phplens.com/adodb/supported.databases.html On 8/29/06, fperini <[EMAIL PROTECTED]> wrote: > > I am working to one week with the CakePHP. I am not obtaining to > connect with oracle 9i and cakeph

Oracle 9i with CakePHP

2006-08-29 Thread fperini
I am working to one week with the CakePHP. I am not obtaining to connect with oracle 9i and cakephp. If it will have some example. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this gr

Re: Using a model for multiple tables

2006-08-29 Thread nate
No, not really. You can use one table to populate several models, but not the other way around. --~--~-~--~~~---~--~~ 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@google

Re: url and routing

2006-08-29 Thread [EMAIL PROTECTED]
HTH http://wiki.cakephp.org/tutorials:routing_for_multilanguage it work's for me..and so easy ... --~--~-~--~~~---~--~~ 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@goog

Re: Using a model for multiple tables

2006-08-29 Thread Kabuto
John David Anderson (_psychic_) wrote: > > If you have a bunch of tables that are all the same structure, why > not store the collective information in a single table? > > -- John I unfortunately cannot change the table structure because they are used by some other scripts as well. Joining these

Re: Using a model for multiple tables

2006-08-29 Thread John David Anderson (_psychic_)
On Aug 29, 2006, at 8:50 AM, Kabuto wrote: > > Hi, > > I have several tables all of the same structure. I would like to use > one model for them all. Is it possible to change the table of a model > at runtime? I'm thinking of something like $this->Model->useTable = > 'tableName' which unfortunat

Pagination of another's model controller

2006-08-29 Thread [EMAIL PROTECTED]
Hello all, I have a following problem. I have two models "Session" and "Comment" and their controllers and baked views Session hasMany Comments My brief question: How to access CommentsController in SessionsController? Why am I asking? Some Sessions has too many comments (thousands), so that w

Using a model for multiple tables

2006-08-29 Thread Kabuto
Hi, I have several tables all of the same structure. I would like to use one model for them all. Is it possible to change the table of a model at runtime? I'm thinking of something like $this->Model->useTable = 'tableName' which unfortunately does not work. Thanks in advance Kabuto --~--~

Re: Re: Optimising cake

2006-08-29 Thread Samuel DeVore
also if you do not need/want the associated models you can user recursive = 0 or -1 (I forget which) to have cake not even try t oget them... On 8/29/06, DJ Spark <[EMAIL PROTECTED]> wrote: > > Hi sonic, > > In debug mode > 0 , cakephp caches models for a few seconds (20 sec) > . In production

Re: Optimising cake

2006-08-29 Thread DJ Spark
Hi sonic, In debug mode > 0 , cakephp caches models for a few seconds (20 sec) . In production mode, it's much longer (a day ? i'm not sure). Besides that, this thread goes deeper on optimization issues: http://groups.google.com/group/cake-php/browse_thread/thread/75ecc8bee3f7ddfe/0572659f27

Re: Problem with HABTM tables

2006-08-29 Thread DJ Spark
yep, you have to, that's how cakephp sets relationships between models in the User model you say something like and in the Group model And that's it. IF you don't follow the cake conventions for ids, tables, or if you need some different queries or conditions for a Model (for example, you

Re: Optimising cake

2006-08-29 Thread Sonic Baker
Update: Something strange is happening. If I refresh the page both the number of queries and time changes. Ok the time changing is expected, but the number of queries??? Is this something to do with caching? Cheers, Sonic --~--~-~--~~~---~--~~ You received this m

Optimising cake

2006-08-29 Thread Sonic Baker
Just noticed something counter intuituve about cake. I was optimising a method which has a call along the lines of: $stocked_item_details = $this->StockedItem->find( "StockedItem.id = '$stock_item_id'");This returns all the details of the associtated models. Array([StockedItem] => Arr

Re: Problem with HABTM tables

2006-08-29 Thread eDevil
Sorry for the late reply. I had other stuff to do. So here's what I get with DEBUG = 2 and pr($user); die; Array ( [User] => Array ( [id] => 1 [realname] => Saddam Azad [username] => admin [password] => 21232f297a57a5a743894a0e4a801fc3

Re: Cjs stripping non-unicode compatible

2006-08-29 Thread RosSoft
fixed in last version. Download it from cakeforge snippets --~--~-~--~~~---~--~~ 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 gr

Re: Production setup on a shared hosting account

2006-08-29 Thread nate
Okay, here's how the configuration should go. Extract Cake and use the extracted folder to replace your public_html folder. Do not change any path settings. Since you're on a shared host and you can't change the DocRoot anyway, separating the core from /app won't do you any good anyway. As lon

Re: HABTM: two associations used same table

2006-08-29 Thread mutabor
Thanks for reply Andy. At last somebody experienced noticed my problem :) Well, I think this is quite delicate topic, when you have to change your database scheme to let it work in Cake. I do not think this is good approach, even if whole development run within Cake framework, don't you think so?

Re: 1:many association where order is important

2006-08-29 Thread [EMAIL PROTECTED]
okay i changed the database layout i have now table top5s with only 1 field: id and a table songs with id-artist-title- top5_id relations: top5 hasmany song, song belongsto top5 but now the problem is, that the scaffolded views are not what i want. for example top5s/add.thtml is just a page wit

Re: Production setup on a shared hosting account

2006-08-29 Thread AD7six
Hi Pradeep, Pradeep wrote: > When I point my browser to http://www.DOMAIN.com, I get CakePHP's > default home, and a message saying "Your database configuration file is > not present." If you haven´t created a database configuration file, and the page is styled (you can access the css file) the

Re: Production setup on a shared hosting account

2006-08-29 Thread Pradeep
Hi, I did as specified in the above mentioned thread. Here is what I did, I extracted the cake zip file in /home/username so now there is a folder /home/username/cake_1.1.7.3363. Then I moved index file from "/home/username/cake_1.1.7.3363" to "/home/username/public_html" I then edited the /home

Re: HABTM: two associations used same table

2006-08-29 Thread AD7six
Hi Mutabor, Using the same table for 2 different HABTM doesn´t seem that good an idea - cake will only populate 2 of the 3 fields at any one time (as you can see from the generated sql). The deletes are because it is assumed ( I assume :) ) that if you are updating a HABTM relationship you are de

Re: Problem with HABTM tables

2006-08-29 Thread AD7six
Hi eDevil, eDevil wrote: > thanks but how do I get the values loaded in a string? > > I tried $user['Group']['id'] but it says invalid index 'Group'. This would be much easier to discuss on the irc (you can access it from here: http://irc.cakephp.org/irc.html) What do you see on the screen with

Re: HABTM: two associations used same table

2006-08-29 Thread mutabor
It's pity there are no answers. Results are the same while trying to scaffold. And I think Cake can not deal with HABTM type of association when there are more that 2 foreign keys in the same table. To manage it with Cake I think I need to divide this triple relationship with two dual or handle it

Re: 3 table join help?

2006-08-29 Thread mutabor
I have exactly the same problem - http://groups.google.com/group/cake-php/browse_thread/thread/4c85865acbd600a9/ I have asked some smart guys on IRC but no results. I think this is a bug - Cake cant deal with such type of relations --~--~-~--~~~---~--~~ You recei

Re: Problem with HABTM tables

2006-08-29 Thread eDevil
thanks but how do I get the values loaded in a string? I tried $user['Group']['id'] but it says invalid index 'Group'. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send e

Re: Problem with HABTM tables

2006-08-29 Thread AD7six
eDevil wrote: > But that is not the actual problem i'm having. The thing is that I want > to get the information of the group the user belongs to. And if you follow what I suggested you´ll see that it´s already available to you. Cheers, AD7six --~--~-~--~~~---~--~

Re: Problem with HABTM tables

2006-08-29 Thread eDevil
Hi AD7six, Thanks, that helped me simplify the authentication system. But that is not the actual problem i'm having. The thing is that I want to get the information of the group the user belongs to. What I want to do is: 1. use the "user_id" to get the "group_id" from the HABTM table. 2. use the

Re: Problem with HABTM tables

2006-08-29 Thread AD7six
Hi eDevil set DEBUG to 2, put pr ($user); die; in your controller after the find, and you´ll see that you don´t need a subsequent query (unless you changed the recursive paramter in your User model). Incidentally in the 1.2 branch you can do $this->User->findByUsernameAndPassword ($username,$p

Problem with HABTM tables

2006-08-29 Thread eDevil
Hi, I've searched the group topics but didnt find anything useful to help me. So here's the problem: I have 3 tables: - users - groups - groups_users (HABTM) I have a login screen where the user types username and password In this line of code, I am searching the 'users' table with the entered u

Re: Production setup on a shared hosting account

2006-08-29 Thread AD7six
Hi Pradee, This thread is very similar: http://groups.google.com/group/cake-php/browse_frm/thread/d13428237c7a6557/# Cheers, AD7six --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to thi

Re: data associations

2006-08-29 Thread AD7six
Hi All, The 'problem' using bind model is that you will get all ProductTypes, with associated Products that match the constraint where they exist. This means that you will get (if they exist) ProductTypes that don´t have Products that match the constraint (because it´s using a left join). If you

Production setup on a shared hosting account

2006-08-29 Thread Pradeep
Hi, I want to setup Cake PHP in production environment. The problem is that I am using shared hosting account and I can not change DocumentRoot on server. Is there any step by step guide on doing production setup of cake php on a shared hosting account? Any help would be appreciated. -- Prade