Re: table relations

2006-09-25 Thread nate
> Can you expand on why CakePHP will never support composite primary keys? Because singular primary keys are simple, and composite keys introduce needless complexity into the data model. Anyone who thinks auto-incrementing primary keys are a bad idea is welcome to examine the US Social Security

over write default autocomplete function

2006-09-25 Thread bingo
Hi, I want to show full name (First_name Last_name) in the autocomplete div. The first name and last name are stored in two different fields of a table. I am trying to figure out how to over write default autocomplete function, and, thereby able to join the two fields before displaying it to the

Re: the same to me

2006-09-25 Thread John Zimmerman
On 9/25/06, winson <[EMAIL PROTECTED]> wrote: i have the same trouble,can anyone help meYou might try jumping on IRC if you need help right away.http://irc.cakephp.org/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

Re: some troubles in wiki`s tutorials:beginners_only--step_8--"some security using othauth"

2006-09-25 Thread John Zimmerman
On 9/25/06, winson <[EMAIL PROTECTED]> wrote: hello everyone. i have some troubles in wiki`stutorials:beginners_only--step_8--"some security using othauth". ifollow the tutorials and othauth`s readme,but it do not work. Maybe mymother tongue is not english so that i have miss some important details

the same to me

2006-09-25 Thread winson
i have the same trouble,can anyone help me --~--~-~--~~~---~--~~ 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

some troubles in wiki`s tutorials:beginners_only--step_8--"some security using othauth"

2006-09-25 Thread winson
hello everyone. i have some troubles in wiki`s tutorials:beginners_only--step_8--"some security using othauth". i follow the tutorials and othauth`s readme,but it do not work. Maybe my mother tongue is not english so that i have miss some important details from the english`s tutorials. so ,can any

Re: Admin, could you please add a subject prefix for this group?

2006-09-25 Thread John Zimmerman
On 9/25/06, Kjell Bublitz <[EMAIL PROTECTED]> wrote: HeyaI just enabled the "mail on new message" for this group. The subjects not always tell if it's about cake, so i feel a little spammed. Could you please add something like  [cake-php] to all subjects ie. group-prefix? I never owned a group on g

Re: HasMany and recursive FindAll

2006-09-25 Thread Marcus Derencius
Hi, Try querying this way: --- $results = $this->Company->Sector->findAll("Sector.sector_name = 'Biomass'", null, 'order by Company.company_name', null, null, 1); --- I hope it helps, Marcus Derencius http://www.taoweb.com.br --~--~-~--~~~---~--~~ You received

dump.thtml

2006-09-25 Thread johnpfisk
I want to override dump.thtml, so I copied the original from cake/libs/view/templates/elements to app/views/elements but it doesn't seem to pick my copy up. Is this the right thing to do, or am I way off line? --~--~-~--~~~---~--~~ You received this message becau

Re: HasMany and recursive FindAll

2006-09-25 Thread Marcus Derencius
Hi, Try querying this way: --- $results = $this->Company->Sector->findAll("Sector.sector_name = 'Biomass'", null, 'order by Company.company_name', null, null, 1); --- I hope it helps, Marcus Derencius http://www.taoweb.com.br --~--~-~--~~~---~--~~ You received

Re: HasMany and recursive FindAll

2006-09-25 Thread Marcus Derencius
Hi, Try querying this way: --- $results = $this->Company->Sector->findAll("Sector.sector_name = 'Biomass'", null, 'order by Company.company_name', null, null, 1); --- I hope it helps, Marcus Derencius http://www.taoweb.com.br --~--~-~--~~~---~--~~ You received

Re: HasMany and recursive FindAll

2006-09-25 Thread Marcus Derencius
Hi, Try querying this way: --- $results = $this->Company->Sector->findAll("Sector.sector_name = 'Biomass'", null, 'order by Company.company_name', null, null, 1); --- I hope it helps, Marcus Derencius http://www.taoweb.com.br --~--~-~--~~~---~--~~ You received

Re: table relations

2006-09-25 Thread Kjell Bublitz
Humm.. well.. i can set INDEX to any column (which speeds that one up).I think a autoincrement unique id is just slowing things down here.We always query multiple rows based on duplicate entries.In other words: We dont ask for "id" 1 to 20 in the joinTable, we ask for "post_id" number 5 (which may

Re: Admin, could you please add a subject prefix for this group?

2006-09-25 Thread Mikee Freedom
hey dood, a quick fix in the mean time, i set up a filter to apply a label to all emails that are sent to [EMAIL PROTECTED] pretty much replicating the functionality you just mentioned with whatever label i wanted. just a thought. cheers, freedom On 26/09/06, Kjell Bublitz <[EMAIL PROTECTED]>

Admin, could you please add a subject prefix for this group?

2006-09-25 Thread Kjell Bublitz
HeyaI just enabled the "mail on new message" for this group. The subjects not always tell if it's about cake, so i feel a little spammed. Could you please add something like  [cake-php] to all subjects ie. group-prefix? I never owned a group on google but i know that it is possible. All my other gr

i cannot use callback functions in a controller

2006-09-25 Thread codecowboy
Hi, I am trying to use Pear::Structures_Datagrid and one of its functions makes use of a callback function: class blah extends AppController { . . . function doBlah() { $datagrid->addColumn(new Structures_DataGrid_Column('Job Type', null, null, array('width' => '20%'), null, 'get

Why do plugins use separate sessions?

2006-09-25 Thread [EMAIL PROTECTED]
I have an authentication/authorization plugin that stores a user's id in the session when they login. So my plugin's UsersController does this in its login action: $this->Session->write('User.id', $user['User']['id']); In my main app I'd like to access this stored id. However in any of my main

Re: Use a plugin's model in main app

2006-09-25 Thread [EMAIL PROTECTED]
I essentially solved this by doing the following: if (!class_exists('PizzaOrder')) { loadPluginModels('pizza'); } $p = new PizzaOrder(); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To pos

Re: HasMany and recursive FindAll

2006-09-25 Thread Mikee Freedom
sorry, a good tute on bindModel http://cakebaker.42dh.com/2006/02/22/new-feature-bindmodelunbindmodel/ On 26/09/06, Mikee Freedom <[EMAIL PROTECTED]> wrote: > I ran across this problem a while ago. > > Pretty much you have the following options: > > 1. set up your association with the condition

Re: HasMany and recursive FindAll

2006-09-25 Thread Mikee Freedom
I ran across this problem a while ago. Pretty much you have the following options: 1. set up your association with the condition i.e. in your Company hasMany association set the condition "Sector.sector_name = 'Biomass'" 2. bind your models at any point with this condition at any point in you

Re: Bake Error

2006-09-25 Thread Syl
Figured it out. I should've added the app_dir on the end of my command line, which in this case was just app. So the commands would look like : php bake.php -app app Syl --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

Re: updating to various tables

2006-09-25 Thread Mikee Freedom
hey Michael, to use data from multiple tables your controller has to have access to each of these models either via the assocations that exist between models or your uses var in your controller. e.g. Images and Albums In my Image Model I have a belongsTo association telling cake that each of my

Re: Compound Keys in CakePHP

2006-09-25 Thread John Zimmerman
On 9/25/06, johnvv <[EMAIL PROTECTED]> wrote: I'm just getting started with CakePHP and would like to know if it canhandle compound keys in a database.For example, if you were to add tags to a blog, the schema wouldroughly betable: article(article_id, article_text, PRIMARY_KEY(article_id)); table:

Compound Keys in CakePHP

2006-09-25 Thread johnvv
I'm just getting started with CakePHP and would like to know if it can handle compound keys in a database. For example, if you were to add tags to a blog, the schema would roughly be table: article(article_id, article_text, PRIMARY_KEY(article_id)); table: tag (tag_id, tag_word, PRIMARY_KEY(tag_id

Where should I put this?

2006-09-25 Thread hydra12
I'm creating an app for work (a public school district), and I want to authenticate users against our existing Active Directory so the users don't have to learn a new username/password. I also want to be able to use this code in other apps. I'm planning to use adLDAP to talk to Active Directory.

Re: What Editor Do You Use

2006-09-25 Thread HalfBaked
I am moving away from Vi / ViM in favor of gPHPEdit for Cake programming. http://www.gphpedit.org/ I also use UltraEdit-32 in Windows and Wine, but this is commercial software. Well worth the cost IMO. http://www.ultraedit.com/ I am afraid that none of these meet your Cross Platform / freeware

Where should I put this?

2006-09-25 Thread hydra12
I'm working on a project at work (for a public school district) that runs on a Windows 2003 network. I want to create an authentication system that will integrate with our current Active Directory setup, so our users don't need another username/password. I'll probably use adLDAP, since I'm alrea

Re: What Editor Do You Use

2006-09-25 Thread Brian French
RadRails http://www.radrails.org/ would be nice if it could be retrofitted to work with cake seing as how cake is (basically) a rewrite of ROR. BlenderStyle wrote: > I'm curious to know what text editor everyone's using. I'm all about > free stuff, so I've been using PSPad. It's pretty good, I

Re: Am I right about models?

2006-09-25 Thread nate
Generally, the division of labor of "business rules" is between the model and the controller, and there is often some overlap in terms of the responsibilities of each. Validation is a good example: it usually makes sense to do validation in the model, but sometimes you need external information,

Re: Stats

2006-09-25 Thread Brian French
Another 'Up to the minute' one is visistat.com but they cost something like 100 a year or so. We use them at our job. They are pretty nice and have alot of info. [EMAIL PROTECTED] wrote: > I LOVE my Google Analytics account. It is wonderful for me. > > But, I just came across this for up to th

Re: What Editor Do You Use

2006-09-25 Thread Matt Adams
clemos wrote: > about emacs, I've been hearing of its power, and trying it sometimes > for years now, but without much success. Then I took a month to really > learn the way it works and the shortcuts and all. Finally, I found > that the multiple modes (PHP/HTML/JS ...) was weird and that emacs >

Re: afterSave() generate email

2006-09-25 Thread Brian French
Maybe i'm wrong, but wouldn't you want the emailing of a user in the controller instead of the Model? data)){ if ($this->Bookmark->save($this->data['Bookmarks'])) { $this->_sendEmail($address,'Bookmark Saved','Bookmark saved to database'); }

Re: Conventions on many-to-many recursive table?

2006-09-25 Thread Brian French
I did something similar to this. Check out the hasAndBelongsToMany Sonic Baker wrote: > You can call your table and foreign keys anything you want as long as > you define them in the association arrays. Maybe you already know this > though. > > Cheers, > > Sonic > > > --~--~-~--~~-

Re: Am I right about models?

2006-09-25 Thread Sonic Baker
H. I do all my data handling in the Model and only use the Controllers to set view variables or call other actions based on the data returned from the Model. I used to return the raw data and change it in the controller. Recently I've switched to this new (and what I thought was the prefer

Re: What Editor Do You Use

2006-09-25 Thread Sonic Baker
For Something lightweight, I use EditPlus2 on windows and Kate on Linux. They're both pretty much identical. Sonic --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email t

Re: table relations

2006-09-25 Thread Matt Adams
nate wrote: > It's always best to have. It makes for faster indexing, and CakePHP > does not currently, nor will it ever, support composite primary keys. Can you expand on why CakePHP will never support composite primary keys? I'm sure this has been answered before and if it has please feel fr

Re: Conventions on many-to-many recursive table?

2006-09-25 Thread Sonic Baker
You can call your table and foreign keys anything you want as long as you define them in the association arrays. Maybe you already know this though. Cheers, Sonic --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake

Re: table relations

2006-09-25 Thread nate
It's always best to have. It makes for faster indexing, and CakePHP does not currently, nor will it ever, support composite primary keys. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to

Re: New database field

2006-09-25 Thread AD7six
Hi Luis, Sound like you don´t have write access to your tmp folder. If you delete the contents of your /app/tmp/cache/models folders (and make it 777 or otherwise ensure that it is writable along with everything else under tmp) does that take care of your new field? HTH, Regards, AD7six --~-

Re: New database field

2006-09-25 Thread luis
The problem must be my bad english, sorry. Let me explain. I add a new field to an existing table with phpMyAdmin. I want to record also de user that make a comment, for example. So I added the field 'user_id' to 'comments' table. Luis --~--~-~--~~~---~--~~ You r

HasMany and recursive FindAll

2006-09-25 Thread StinkyTofu
I am having trouble searching a joined table with the FindAll function. I have the following models: Company -> hasMany -> Sector Sector -> belongsTo -> Company The Sector table contains a field called sector_name. What I am trying to do is search the database and find all companies that conta

Re: New database field

2006-09-25 Thread Chris Hartjes
On 9/25/06, luis <[EMAIL PROTECTED]> wrote: > > Hi Chris, > Thanks for replying. This is what I have: > - CakePhp version: 1.1.7 and debug mode set up to 3 ;) > I can see is the sql string that cake build, but I don't know where it > looks to built it. Cake creates a sql query with de fields of my

Re: New database field

2006-09-25 Thread luis
Hi Chris, Thanks for replying. This is what I have: - CakePhp version: 1.1.7 and debug mode set up to 3 ;) I can see is the sql string that cake build, but I don't know where it looks to built it. Cake creates a sql query with de fields of my table *before* I add a new one. Any idea? Luis --~-

Re: New database field

2006-09-25 Thread luis
Hi Chris, Thanks for replying. This is what I have: - CakePhp version: 1.1.7 and debug mode set up to 3 ;) I can see is the sql string that cake build, but I don't know where it looks to built it. Cake creates a sql query with de fields of my table *before* I add a new one. Any idea? Luis --~-

Re: New database field

2006-09-25 Thread luis
Hi Chris, Thanks for replying. This is what I have: - CakePhp version: 1.1.7 and debug mode set up to 3 ;) I can see is the sql string that cake build, but I don't know where it looks to built it. Cake creates a sql query with de fields of my table *before* I add a new one. Any idea? Luis --~-

Re: Am I right about models?

2006-09-25 Thread Chris Hartjes
On 9/25/06, temm <[EMAIL PROTECTED]> wrote: > > I do all job in controllers and use models only for something like this > class Book extends AppModel > { > var $name = 'Book'; > } > ?> > As far as I know model should contain main logic but what does it mean > in practice? Hey temm, Under the M

Re: New database field

2006-09-25 Thread Chris Hartjes
On 9/25/06, luis <[EMAIL PROTECTED]> wrote: > > I've created a new field in a table but Cake does not include this > field in the INSERT querys. It does in View (findAll) but not for the > Add (save) > I've added the field in the View form and debuged that the controller > is recieving it. > How c

New database field

2006-09-25 Thread luis
I've created a new field in a table but Cake does not include this field in the INSERT querys. It does in View (findAll) but not for the Add (save) I've added the field in the View form and debuged that the controller is recieving it. How can I tell Cake that I have a new field in a table? It is s

Am I right about models?

2006-09-25 Thread temm
I do all job in controllers and use models only for something like this As far as I know model should contain main logic but what does it mean in practice? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP"

Re: CakePHP Under IIS 6 ... the best way ?

2006-09-25 Thread Dom
thanks ^^ --~--~-~--~~~---~--~~ 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 PROTECTED] For more opt

Re: CakePHP Under IIS 6 ... the best way ?

2006-09-25 Thread nate
Hmm, then IIS 6 must be setup a little different, because both of those last ones work fine for me on IIS 5. I'll see if I can track down a copy and get it working. If you get it working first, post back here and let me know. --~--~-~--~~~---~--~~ You received t

Re: CakePHP Under IIS 6 ... the best way ?

2006-09-25 Thread Dom
URL/index.php?/controller/method/id and URL/index.php/controller/method/id don't work ... Regards Dom. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-ph

Re: CakePHP Under IIS 6 ... the best way ?

2006-09-25 Thread Dom
URL/index.php?/controller/method/id and URL/index.php/controller/method/id don't work Regards Dom. --~--~-~--~~~---~--~~ 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@go

Re: Database connections with custom classes

2006-09-25 Thread nate
Cake won't do anything to queries you run in custom classes. One thing to watch out for with MySQL connections, however, is that if you're connecting to two different databases on the same server, PHP will try to use the same connection resource for both, which results in one connection overwriti

Use a plugin's model in main app

2006-09-25 Thread [EMAIL PROTECTED]
Is it possible to use a plugin's model in your main app? For example, if I'm using the Pizza plugin example from http://manual.cakephp.org/chapter/plugins, how would I use the PizzaOrders model in one of my main app controllers? I've tried both of the following: var $uses = array('PizzaOrders')

Re: Bake Error

2006-09-25 Thread Syl
Thanks for all your responses - I was away and just got back. Here is my command line : php bake.php -app I am running it from this directory : C:\wamp\www\WebWantAds\cake\scripts> With the following directory for my cake application. C:\wamp\www\WebWantAds\app Looking at the bake code, I ca

Re: CakePHP Under IIS 6 ... the best way ?

2006-09-25 Thread Dom
URL/index.php?url=/controlleur/method/id ? --~--~-~--~~~---~--~~ 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

Re: CakePHP Under IIS 6 ... the best way ?

2006-09-25 Thread Dom
and ... What's the url of scaffold without rewrite ? Regards. Dom. --~--~-~--~~~---~--~~ 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 fr

Re: CakePHP Under IIS 6 ... the best way ?

2006-09-25 Thread Dom
isapi_rewrite unintalled (rewrite applied to all website ) i try without the rewrite ... What's the url whithout rewrite ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, s

Re: Redirect() vs Render() Question

2006-09-25 Thread [EMAIL PROTECTED]
What you might be looking for is elements. If you have shared little chunks of html that get used you can use elements and pass them data. $this->renderElement('name', array('value' => $value)); As for not stopping controller logic. Always just get into the habit of putting return false after i

Re: table relations

2006-09-25 Thread Kjell Bublitz
On comment_post, is the primary key "id" really necessary? Doesn't the unique pairing of both values help cake to figure it out ? .. i mean.. its a pairing of two already unique IDs, so why there should be a need for another unique ID in the JoinTable? 2006/9/25, Daniel Schmitz <[EMAIL PROTECTED]>:

Re: table relations

2006-09-25 Thread Daniel Schmitz
great ! tanks ! On 9/23/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > HABTM must have an intermediate table that contains the lookup ids of > the relations. > > Post > id > > Comment > id > > comment_post > id > post_id > comment_id > > > > > --~--~-~--~~~---

updating to various tables

2006-09-25 Thread michael234
Hi, I'm having a bit of trouble working out how to bring in and update data from different table. Basically I'm trying to do two things: populate a field with the id from one table and then insert it into another table and bring in data from two tables, edit it and then save it back to the respect

Re: What Editor Do You Use

2006-09-25 Thread [EMAIL PROTECTED]
jEdit does all that and more. You just need to get some plugins for it to syntax highlighting, XML browser, etc. I have my jEdit setup with the structure browser plugin so it shows a list of functions at the left that I can click on and quickly jump to. The plugins I have running: XML Sidekick

Re: What Editor Do You Use

2006-09-25 Thread [EMAIL PROTECTED]
jEdit does all that and more. You just need to get some plugins for it to syntax highlighting, XML browser, etc. I have my jEdit setup with the structure browser plugin so it shows a list of functions at the left that I can click on and quickly jump to. The plugins I have running: XML Sidekick

Re: CakePHP Under IIS 6 ... the best way ?

2006-09-25 Thread Dom
Hi , Isapi_rewrite is intalled but i have some problems URL/controller/ works (URL/controller/ -> index) but URL/controller/method/ don't work edit httpd.ini ? on my server : [ISAPI_Rewrite] RewriteRule (.*?\.php)(\?[^/]*)?/([^/]*)/(.*) $1(?2$2&:\?url=/$3/$4) RewriteRule ^/(.*)/ /index.php?ur

Re: Help getting started: creating related records

2006-09-25 Thread [EMAIL PROTECTED]
Doing all but HABTM with a multiple selectTag you have to manually manage the foreignKey's. What this means is you have to set it. Usually this means that you create one records, get the last inserted id, and use that as the foreignKey for the related records if you are saving them all in the sam

Re: Help getting started: creating related records

2006-09-25 Thread [EMAIL PROTECTED]
Doing all but HABTM with a multiple selectTag you have to manually manage the foreignKey's. What this means is you have to set it. Usually this means that you create one records, get the last inserted id, and use that as the foreignKey for the related records if you are saving them all in the sam

Re: Help getting started: creating related records

2006-09-25 Thread [EMAIL PROTECTED]
Doing all but HABTM with a multiple selectTag you have to manually manage the foreignKey's. What this means is you have to set it. Usually this means that you create one records, get the last inserted id, and use that as the foreignKey for the related records if you are saving them all in the sam

Re: Stats

2006-09-25 Thread djiize
OMG! I'm sorry for "spamming"... I got Server Error from Google groups, so I tried to post several time :( --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-

Re: What Editor Do You Use

2006-09-25 Thread clemos
hi after trying both Eclipse and Emacs, I finally came back using Scite. I first went to Eclipse for actionscript programming and swf comiling without macromedia Flash (see http://osflash.org). but I really find it too big, I don't need so much features, and I still don't understand anything to

Re: What Editor Do You Use

2006-09-25 Thread [EMAIL PROTECTED]
I am sorry for repeated messages... but I was getting an error from google, that message was not posted... so I retried many times ;) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to

config help!

2006-09-25 Thread [EMAIL PROTECTED]
i have read the tutorial here: http://groups.google.com/group/cake-php/tree/browse_frm/thread/94625f2803546def/31a623769c72ab66?rnum=1&_done=%2Fgroup%2Fcake-php%2Fbrowse_frm%2Fthread%2F94625f2803546def%2F3396b4b08ffb98ee%3F#doc_31a623769c72ab66 and I must say I'm still quite a bit perplexed on h

Re: Database connections with custom classes

2006-09-25 Thread leea
Well, i somehow managed to fix this problem. But i dont think its the right way to do it. I changed all queries in my models to specify their database. SELECT * FROM MYTABLE; is now SELECT * FROM MYDATABASE.MYTABLE; It seems as this will bypass any prepends cake does to its DB calls. --~--~