Re: Proposal for "killer app"

2007-04-09 Thread Felix Geisendörfer
Nice morning read ... Normally I'd argue for a "don't feed the trolls"-policy but I guess in nate's case an exception has to be made ; ). I know nothing in my RSS reader is going to crack me up as good as nate just did ; ). -- Felix -- http://www.thinkingphp.org http://w

Re: Help with "GROUP BY"

2007-04-09 Thread [EMAIL PROTECTED]
I use the following code in my blog post controller: ... $this->BlogPost->expects(array('User')); $this->BlogPost- >bindModel(array('hasOne'=>array('Dummy'=>array('className'=>'BlogComment','foreignKey'=>'blog_post_id'; $this->set('blog_posts', $this->BlogPost->FindAll('GROUP BY BlogPost.id',

Re: Why does Cake generate these redundant unnecessary queries?

2007-04-09 Thread barduck
Thanks for the reply. I am using "recursive = 2" in the example because although it is not needed in the sample code, I do need it in the real scenario where I have other associations. Yes, I am familiar with this article and tried the expects() method. It can help when you need to remove unwant

Re: STOP button in browsers and onLoad event

2007-04-09 Thread nate
http://codejanitor.com/wp/2006/03/23/ajax-timeouts-with-prototype/ On Apr 10, 1:02 am, "skyblueink" <[EMAIL PROTECTED]> wrote: > Sorry, this is not CakePHP stuff, but javascipt stuff. > > When we fire a javascript function through "onLoad" event, it works > through two steps like the following: >

STOP button in browsers and onLoad event

2007-04-09 Thread skyblueink
Sorry, this is not CakePHP stuff, but javascipt stuff. When we fire a javascript function through "onLoad" event, it works through two steps like the following: (1) First, the page is loaded. (2) Javascript function is fired. This is the definition of onLoad event, and we all know that the STOP

RE: Proposal for "killer app"

2007-04-09 Thread Mariano Iglesias
Well, developing applications since XXX is not bad, and it doesn't necessarily mean that you are outdated, but that has nothing to do with the conversation anyway, as Nate pointed out. Furthermore, most (not all) of the people who say: "I develop C, C++, C#, ASM, ASP, Perl, Delphi, VB, etc. etc."

Re: Proposal for "killer app"

2007-04-09 Thread BlenderStyle
Nate, you said it. I always appreciate your candidness. You're right. There's plenty out there to learn Cake. I'm doing pretty good with it. Besides, Cake is still fairly early in development. I mean, 1.1 is documented enough to get you off your feet for sure. I didn't even know what MVC was befor

Re: newbie question about multiple databases

2007-04-09 Thread BlenderStyle
Did migrating to 1.2.0.4798alpha fix your problem? I've found, that even though it's an alpha, 1.2 works pretty well. On Apr 9, 6:06 pm, Sergei Gerasenko <[EMAIL PROTECTED]> wrote: > I was using 1.1.14 but then when I got the error I tried the > 1.2.0.4798-alpha. That is, I replaced the 1.1.14 ca

Re: Proposal for "killer app"

2007-04-09 Thread nate
Yeah, who knows. At least it was equal parts funny and obnoxious. On Apr 9, 11:30 pm, "Gonzalo Servat" <[EMAIL PROTECTED]> wrote: > On 4/10/07, nate <[EMAIL PROTECTED]> wrote: > > > > > [..snip..] > > > just my 2 cents worth > > > And you can keep them. > > > Gay Perry:"Look up idiot in

RE: Proposal for "killer app"

2007-04-09 Thread Mariano Iglesias
I'm not going to say any "bad words". Just that if indeed some developers are going away, then you are most welcome to leave. Believe me, after reading all you had to say, the community is better of without you. -MI --- Re

Re: Proposal for "killer app"

2007-04-09 Thread Gonzalo Servat
On 4/10/07, nate <[EMAIL PROTECTED]> wrote: > > [..snip..] > > just my 2 cents worth > > And you can keep them. > > Gay Perry:"Look up idiot in the dictionary. You know what > you'll find?" > Harry Lockhart: "A picture of me?" > Gay Perry:"No! The definition of idiot. Which you f

Re: Proposal for "killer app"

2007-04-09 Thread nate
On Apr 9, 9:43 pm, "laboca" <[EMAIL PROTECTED]> wrote: > I just would like to say that I totally agree with "a good sample > app"... CMS would be a real world example. Great, then go write one. But whether you write one or not, for the love of God, please just quit talking about it. > I'm a de

Re: Why does Cake generate these redundant unnecessary queries?

2007-04-09 Thread dericknwq
This was my point when I posted http://groups.google.com/group/cake-php/browse_thread/thread/b73a9a23b593c837/f0a4ae54e8892e45?hl=en#f0a4ae54e8892e45 Anyways, I don't suppose you will need a level 2 recursive call based on the Model you've shown. But http://bakery.cakephp.org/articles/view/185 sh

Re: ajax and internet explorer.

2007-04-09 Thread d34db0lts
anybody? Bueller? Bueller? On Apr 9, 5:38 am, "d34db0lts" <[EMAIL PROTECTED]> wrote: > so i've read a couple discussions but nothing has helped. > > i know these things: > i need to have RequestHandler > and set the charset to utf-8 > > this is my controller: > > class ProductsController extends

Re: Scary associations with recursive calls

2007-04-09 Thread dericknwq
Yes exactly. I tried the expects() and it works like a charm. When recursive calls get too deep, the replicated queries get really scary. On top of that half the time we will not be using most of the data returned as well. It will be really sweet if there is a way to not just specify the Model req

Re: Scaffold with Cake-1.2.0.4798alpha

2007-04-09 Thread [EMAIL PROTECTED]
I realized that I had a default.ctp file that was not setup correctly. I removed it and the scaffold functionality worked perfectly. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this

Another CakePHP poll

2007-04-09 Thread Chris Lamb
Cakers, Rnickel posted this on IRC. The Cake community did a great job with the previous poll, lets's see them in action again! http://www.jcxsoftware.com/ Regards, -- Chris Lamb, Cambridgeshire, UK GPG: 0x634F9A20 signature.asc Description: PGP signature

Styling a flash message generated by Auth

2007-04-09 Thread Aaron Shafovaloff
In CakePHP 1.2, Auth generates a flash message that is given the ID of "Auth.login". In CSS, is there a way to style this by its ID? The period makes it difficult! :-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Proposal for "killer app"

2007-04-09 Thread laboca
I just would like to say that I totally agree with "a good sample app"... CMS would be a real world example. I'm a developer of desktop apps since 1987 (C++,C#,ASM,VB,Delphi,. for windows, unix,..) >From time to time I used PHP for some small projects... So I'm always looking for some good PHP f

Re: newbie question about multiple databases

2007-04-09 Thread Sergei Gerasenko
I was using 1.1.14 but then when I got the error I tried the 1.2.0.4798-alpha. That is, I replaced the 1.1.14 cake directory with the cake directory from the alpha distribution. On Tue, Apr 10, 2007 at 12:46:22AM -, BlenderStyle wrote: > > What version of Cake are you using? > > On Apr 9, 5

Re: newbie question about multiple databases

2007-04-09 Thread BlenderStyle
What version of Cake are you using? On Apr 9, 5:40 pm, Sergei Gerasenko <[EMAIL PROTECTED]> wrote: > Thanks for the quick response. Unfortunately, that didn't do it. > > Here's the modified app/config/database.php > > class DATABASE_CONFIG > { > var $default = array('driver' => 'mysql', >

Automating something with __()

2007-04-09 Thread Aaron Shafovaloff
Is there a way to have __() automatically return the value instead of echoing it, such as with AUTO_OUTPUT? --~--~-~--~~~---~--~~ 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: newbie question about multiple databases

2007-04-09 Thread Sergei Gerasenko
Thanks for the quick response. Unfortunately, that didn't do it. Here's the modified app/config/database.php class DATABASE_CONFIG { var $default = array('driver' => 'mysql', 'connect' => 'mysql_connect', 'host' => 'localhost', 'login' => '***',

Re: Table hasmany

2007-04-09 Thread BlenderStyle
The problem is likely to be the recursion of your find methods. Referring to, If recursive = 0, you won't find any tickets. If recursive = 1, you'll find the tickets, and nothing else. If recursive = 2, you'll find tickets and others. On Apr 9, 1:23 pm, "sumanpaul" <[EMAIL PROTECTED]> wrote: > w

Re: newbie question about multiple databases

2007-04-09 Thread BlenderStyle
I ran into this too. One of the database configs has to be default. So change $psw to $default, and remove var $useConfig in your customer model (it uses default by, well, default). If persistent is set to true, you can't use two configs simultaneously. I'm guessing if persistent is true, and th

Re: newbie question about multiple databases

2007-04-09 Thread Sergei Gerasenko
> You're welcome. In doing this, I learned about the persistent key, so > everyone wins. Let us know how it goes. Just tried this at home and I'm baffled with this error: Cannot redeclare class dbosource in /var/www/cake/cake/libs/model/datasources/dbo_source.php Here's my setup: app/config/da

Scaffold with Cake-1.2.0.4798alpha

2007-04-09 Thread [EMAIL PROTECTED]
I am just attempting to use the new cake release. I created a users table and turned on scaffolding to see it shine in 1.2.x.x. Unfortunately, I get the following error when I try to save. Is this a bug I need to post or did I setup something wrong? Notice (8): Undefined index: format [CORE/cake

Re: Debugging in Eclipse

2007-04-09 Thread Chris Lamb
Gollum wrote: > I have a suspicions that it has something to do with mod_rewrite and > the way it changes urls so the debugger can not work properly, Seems like an ideal thing to be suspicious thing of. But CakePHP can work without mod_rewrite -- just temporarily disable it in a normal site and s

Re: associations

2007-04-09 Thread Sergei Gerasenko
> student belonging to an ethnicity. > think as u will relate in the real world. I'll get back to you on this. I remember that when I specified "belongsTo" in the students model, something strange happened in the query. I need to be at home to test this... --~--~-~--~~~--

Re: associations

2007-04-09 Thread Dan Ballance
thanks very much, sometimes you just need a quick pointer from someone to check you're going in the right direction, cheers again, dan On 09/04/07, sumanpaul <[EMAIL PROTECTED]> wrote: > > > student belonging to an ethnicity. > think as u will relate in the real world. > > regards > suman > > On

Re: newbie question about multiple databases

2007-04-09 Thread Sergei Gerasenko
I must admit that I should have asked you about what you found about the persistent key thingy. Should it be set to "false" in this situation? And if so, why do you think it's the case? Sorry if it sounds like an interview question :) On Mon, Apr 09, 2007 at 08:49:17PM -, BlenderStyle wrote:

Re: newbie question about multiple databases

2007-04-09 Thread BlenderStyle
You're welcome. In doing this, I learned about the persistent key, so everyone wins. Let us know how it goes. On Apr 9, 1:15 pm, Sergei Gerasenko <[EMAIL PROTECTED]> wrote: > Matt, thanks so much for all the time you took to test this thing. I > can see how it could work now. I'm off and running

Re: associations

2007-04-09 Thread sumanpaul
student belonging to an ethnicity. think as u will relate in the real world. regards suman On Apr 10, 1:36 am, Sergei Gerasenko <[EMAIL PROTECTED]> wrote: > One question that has been bugging me is the different between hasOne > and belongsTo. > > For example, let's say I have a table named "stu

Re: associations

2007-04-09 Thread Dan Ballance
i have been wondering about his also ! dan :-) On 09/04/07, Sergei Gerasenko <[EMAIL PROTECTED]> wrote: > > > One question that has been bugging me is the different between hasOne > and belongsTo. > > For example, let's say I have a table named "students" and a table named > "ethnicities", with "

associations

2007-04-09 Thread Sergei Gerasenko
One question that has been bugging me is the different between hasOne and belongsTo. For example, let's say I have a table named "students" and a table named "ethnicities", with "ethnicity_id" being a foreign key in "students". When describing the model for "students", do I think in terms of a s

Re: newbie question about multiple databases

2007-04-09 Thread Sergei Gerasenko
Matt, thanks so much for all the time you took to test this thing. I can see how it could work now. I'm off and running now. Thanks!!! On Mon, Apr 09, 2007 at 07:59:26PM -, BlenderStyle wrote: > > Okay, I just tried it, and it worked. Here's what I did: > > Downloaded cake_1.2.0.4798alpha

Debugging in Eclipse

2007-04-09 Thread Gollum
Did anybody try to debug or trace cakephp code from eclipse? I use zendcore as my php platform and Eclipse has a plugin to use zend debugger. But I can't get any breakpoint to work for me in cakephp when I try to debug any script. I have a suspicions that it has something to do with mod_rewrite an

Re: Prototype Ajax IE

2007-04-09 Thread Siasia
OMG!!! This is the answer on my efforts!!! How could I be so stupid? Thank you very much... On 9 апр, 18:55, "bernardo" <[EMAIL PROTECTED]> wrote: > Try using a div instead of p for view. > > On Apr 9, 3:52 am, "Siasia" <[EMAIL PROTECTED]> wrote: > > > Here are the sources:http://bin.cakephp.org/

Table hasmany

2007-04-09 Thread sumanpaul
well first I am not sure if there is a solution. the problem is : 1. I am creating a bug tracking app (weekend project , just for fun) 2. I have tables : projects, severities, statuses, tickets, types. 3. Projects have hasMany relation with Tickets 4. Tickets have belongsTo relation with severiti

Re: Database Views

2007-04-09 Thread sumanpaul
well it should work. if there seems to be problem try baking the model. It should show the view. If not then there might be some problem with view itself. it works for me. may be cake guys need more info to figure out why u r having problem. regards suman On Apr 9, 11:30 pm, "Joshua Benner" <[EM

Re: newbie question about multiple databases

2007-04-09 Thread BlenderStyle
Okay, I just tried it, and it worked. Here's what I did: Downloaded cake_1.2.0.4798alpha, extracted it, and made app/tmp writeable. I created the following databases/users/tables: database: multidbtest_a user: multidbtest_a table: users (id, name) database: multidbtest_b user:multidbtest_b tabl

Re: Security->requireAuth() woe with Cake 1.1

2007-04-09 Thread yolabingo
After looking at the code for the security component, it appears that a new auth key is always generated at the end of the startup() function. Would it make more sense to only generate an auth key if $controller->action is listed in the requireAuth array? It seems that doing this would solve thi

Re: DIssapearing/reappearing Session variables

2007-04-09 Thread Chris Hartjes
On 4/9/07, dangerd <[EMAIL PROTECTED]> wrote: > > Hello, > > Thought I'd try this forum as I got some useful help from here before. Here's some really useful help for you: If it's not CakePHP related, this is the wrong place to ask someone else to fix your problems. -- Chris Hartjes My motto

DIssapearing/reappearing Session variables

2007-04-09 Thread dangerd
Hello, Thought I'd try this forum as I got some useful help from here before. Anyway, this is the problem; I have a simple authorisation script (in PHP): www.multidome.co.uk/test/authorisation.txt It works great locally but when I upload it no longer works well; the problem is that it takes me

Security->requireAuth() woe with Cake 1.1

2007-04-09 Thread yolabingo
I am encountering a problem that seems to be described in the following ticket: "Different _Token/key's are set in form and written to session, if action (protected with requireAuth) includes requestAction with autorender" - https://trac.cakephp.org/ticket/2282 Basically, I have a header defined

Database Views

2007-04-09 Thread Joshua Benner
Sorry for all the questions... A bit of searching didn't seem to yield a definite answer on this... Is there a way to force CakePHP to use a database view in the place of a table? When I configure a model to point to a view right now, it complains about not finding the indicated table. --~--~--

Re: newbie question about multiple databases

2007-04-09 Thread Sergei Gerasenko
> Yes, that should work. I haven't tried it, and I don't know how Cake > queries in a situation like this, but it doesn't hurt to try. Try it > out with scaffolding, and see if it works. Let us know. I think it would definitely stop working if database "B" has another username/password combinatio

dbo_adodb bug?

2007-04-09 Thread Joshua Benner
I'm not entirely sure if this is where I should post this (direct me elsewhere if necessary). My environment is cake 1.2 on php 5 running on red hat enterprise linux 5, using odbtp to communicate with windows server 2003 running the odbtp service process, communicating with SQL Server 2000. Works

Re: Associating different Data Sources

2007-04-09 Thread Joshua Benner
I ended up actually using a view in the second database which pulls from the repository database, then I defined a model on top of that view. I did this because the data that single model would be referring to was actually spread over many tables for the purposes of another (primary) commercial ap

Why does Cake generate these redundant unnecessary queries?

2007-04-09 Thread barduck
Hi, I was looking at my SQL debug logs and seeing a lot of redundant unnecessary queries which I don't think should be there at all. I am using the nightly build of 1.2 from couple of days ago but I was seeing this with 1.2 for quite a while. So I created a very basic scenario and this is still

Problem with redirect() when DOCUMENT_ROOT is pointing to app directory

2007-04-09 Thread joel
I have two apps, both sharing the core cake files. App 1 is in the app folder, same directory as /cake, and it's the default app, so the domain is hitting the .htaccess files and issuing the correct application. App 2 is in a directory called /app2, which is in the same directory as above with /

Re: two foreign keys referencing the same field in the same table

2007-04-09 Thread soytuny
In a project I'm working on, I have a messages table as well. In the message.php I have the following association var $belongsTo = array( 'Recipient' => array('className' => 'User', 'foreignKey' => 'recipient_id', ), 'Sender' => array('cla

Re: need a php mentor close to home-Huntsville, Alabama -can pay some

2007-04-09 Thread Chris Lamb
[EMAIL PROTECTED] wrote: > i am seeking a person close to home -say 150 miles-250 miles from > huntsville, alabama-whereby i can hands on learn how to integrate > scripts and build databases on my website Have you tried finding your nearest Linux User Group? I'll bet my hat there'll be someone wh

two foreign keys referencing the same field in the same table

2007-04-09 Thread erdbeerelse
hello, I have a question about naming convention with foreign keys. in my first table (users) I have a primary key id, which is the user id followed by username, useradress in my second table (msgs) I save messages from a user to a user. So I want to reference the foreigns keys fromuser and t

Re: Prototype Ajax IE

2007-04-09 Thread bernardo
Try using a div instead of p for view. On Apr 9, 3:52 am, "Siasia" <[EMAIL PROTECTED]> wrote: > Here are the sources:http://bin.cakephp.org/view/1929596573 > Badly need help. > I already lost nearly 5 hours banging by head against the wall trying > to get this code work in IE. > In FF and Opera e

Re: Associating different Data Sources

2007-04-09 Thread nate
Yes. Just set up each database config in database.php, and choose which one each model will use by setting var $useDbConfig = "x"; Then associate your models as normal. Keep in mind, however, that cross- database associations tend to generate more queries, since you don't have the benefit of be

Re: newbie question about multiple databases

2007-04-09 Thread BlenderStyle
Yes, that should work. I haven't tried it, and I don't know how Cake queries in a situation like this, but it doesn't hurt to try. Try it out with scaffolding, and see if it works. Let us know. On Apr 8, 1:49 pm, Sergei Gerasenko <[EMAIL PROTECTED]> wrote: > On Sun, Apr 08, 2007 at 06:58:33PM -00

need a php mentor close to home-Huntsville, Alabama -can pay some

2007-04-09 Thread [EMAIL PROTECTED]
i am seeking a person close to home -say 150 miles-250 miles from huntsville, alabama-whereby i can hands on learn how to integrate scripts and build databases on my website i am tired of depending on others you know what they say about teaching folks how to fish i have no problem building nice

Re: OPPL License

2007-04-09 Thread scott lewis
On 09-Apr-2007, at 08:15, [EMAIL PROTECTED] wrote: Hi, I was wondering about the OPPL license. I have seen this license on some projects in CakeForge. I have not been able to find much about this in this group, Google, or Wikipedia. Anyone have a link to info/plain English version of this licen

OPPL License

2007-04-09 Thread [EMAIL PROTECTED]
Hi, I was wondering about the OPPL license. I have seen this license on some projects in CakeForge. I have not been able to find much about this in this group, Google, or Wikipedia. Anyone have a link to info/plain English version of this license? Recomendations? The only thing I found using Googl

2 questions about ACL

2007-04-09 Thread codecowboy
Hi Everyone, I have been working on a web application for some time now. My application requires an elaborate permissions schema. I have been trying to figure out Cake's ACL for a while. I've read every article that I could find about it. Here are the two questions that I have left. 1. Can

Re: newbie question

2007-04-09 Thread Sergei Gerasenko
Hello, > I assume that you mean "3 schemas" when you say "3 databases". I meant "database" as in the "CREATE DATABASE" statement in MySQL. > I think you can select which schema you want to use on the fly. > You can define the dbconfigs on the appropriate file and then switch > between them usin

Associating different Data Sources

2007-04-09 Thread Joshua Benner
I'm preparing to dive into a Cake project. In this application, there will be basically just 3 tables which augment, describe, or link data that is found in several tables in a different data source (our primary data repository). Is it possible to associate models from different data sources? (tec

Re: Blank Lines before DOCTYPE

2007-04-09 Thread Chris Lamb
PaulV wrote: > I've sorted it now with the help of Matti. > > I had extra lines at the end of a helper. I never thought to check > those. Let's try a bit of magic: $ find -name "*.php" | xargs sed -i -e :a -e '/^\n*$/{$d;N;ba' -e '}' Removes all trailing newlines from PHP files under the curr

Re: Blank Lines before DOCTYPE

2007-04-09 Thread PaulV
I've sorted it now with the help of Matti. I had extra lines at the end of a helper. I never thought to check those. Paul --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group,

Re: newbie question

2007-04-09 Thread Jan Boonen
Hi, You can also use different names for your models. With the class variable $useTable, you can let the model point to any table in your schema. As mindcharger already said, you can use the class variable $useDbConfig to let the model use the correct schema/database. Cheers, Jan --~--~--

Re: Scary associations with recursive calls

2007-04-09 Thread Felix Geisendörfer
> > I've used expects() and in my opinion, should become a core feature of > CakePHP. It feels a lot more natural than the bind and unbinding of > associations. It's succinct. And because it's built on top of the bind/ > unbind approach, you can still use it if necessary. +1. I could not imagine de

Re: Scary associations with recursive calls

2007-04-09 Thread jonathan.snook
On Apr 9, 12:01 am, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > This sounds like a scream for help, and expects() is up to the challenge ;) > > http://bakery.cakephp.org/articles/view/185 I've used expects() and in my opinion, should become a core feature of CakePHP. It feels a lot more natur

Re: newbie question

2007-04-09 Thread mindcharger
Hello, I assume that you mean "3 schemas" when you say "3 databases". I think you can select which schema you want to use on the fly. You can define the dbconfigs on the appropriate file and then switch between them using the model's $useDbConfig var. As of putting the models and controllers on

ajax and internet explorer.

2007-04-09 Thread d34db0lts
so i've read a couple discussions but nothing has helped. i know these things: i need to have RequestHandler and set the charset to utf-8 this is my controller: class ProductsController extends AppController { var $name = 'Products'; var $uses = array('Product', 'Occasion', 'H

Re: DreamHost and CakePHP?

2007-04-09 Thread neospirit
Hi, I'm really sorry, should've searched the group before posting, not the other way around. But thank you all for answering the question anyway. This is a great community indeed :). Thanks again. Regards, uwie --~--~-~--~~~---~--~~ You received this message bec