Re: habtm with different roles

2007-08-21 Thread RichardAtHome
What you have is: A message has an author and a recipient. Both the author and recipient are users so Message Table: id, Primary Key author_id, Foreign Key to Users table recipient_id, Foreign Key to Users table Check out the docs for $belongsTo, you can tell cake that the author_id field

Re: can't get index.php page to show in color and images

2007-08-20 Thread RichardAtHome
I had this problem myself only yesterday on my home (Windows) machine. Here's the solution: Don't change Directory / Look a little further down the conf file and you'll see another directory section that points to your web root (e.g): Directory c:\htdocs\ Make the changes there ;-) On Aug

Re: R: Auditing

2007-08-20 Thread RichardAtHome
If you are using a later version of MySQL (= 5.0.2), you could add a database trigger (ON UPDATE, ON DELETE, etc.) to log changes automatically without having to change your code. See: http://dev.mysql.com/doc/refman/5.0/en/triggers.html On Aug 20, 11:59 am, [EMAIL PROTECTED] wrote: This my

Re: Practical effect of Mambo going with CakePHP?

2007-08-16 Thread RichardAtHome
The interesting part for me is that once Mambo is powered by PHP it should be a heck of a lot easier to develop websites that require CMS functionality. Most of the websites I develop at the moment have CMS elements (allowing the site owners to add new content, change content etc.) with some

Re: Can I access database or execute some sql inside views ?

2007-08-14 Thread RichardAtHome
Post the problem and lets see if we can help you out :-) On Aug 14, 10:29 am, Wimg [EMAIL PROTECTED] wrote: correct,, i just have a problem do not how to solve --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake

Re: Error message wrong line...

2007-08-13 Thread RichardAtHome
The PHP back end has encountered a syntax error, but reporting the 'wrong' line. Actually, the line is correct. That's the point at which the PHP backend gave up processing the file. i.e. the syntax error only became apparent when the whole block of code (terminated by the } ) was processed.

Re: Default Controller Action

2007-08-13 Thread RichardAtHome
I think this bakery article answers your question: http://bakery.cakephp.org/articles/view/taking-advantage-of-the-pages-controller I prefer to add a page-by-page route in routes.php: Router::connect('/contact', array('controller' = 'pages', 'action' = 'display', 'contact'));

Re: Link to a location on the same page

2007-08-13 Thread RichardAtHome
Better yet, (doesn't use an 'A' tag to mark up the destination:) div id='Verb'This is where I want to go/div a href='#Verb'Send me there/a On Aug 8, 11:42 pm, Geoff Ford [EMAIL PROTECTED] wrote: Links to the same page do not require the full url so why not use straight html? a name=Verb/

Re: Override $conditions to query WHERE array(INTs)

2007-02-13 Thread RichardAtHome
The problem is that MySQL cannot/will not take a string of integers as a WHERE/IN clause on an INT field Yes it will. The problem is that your aren't passing an array in, your passing a string. Cake automagically converts the where clause to: .. WHERE (`Bid`.`industry_id` IN ('400,402,403')

Re: New User - Problem Going Through Tutorial Your First Bite.

2007-02-13 Thread RichardAtHome
My guess is that you have some whitespace after or before the ?php and ? in your note.php model file. This is a very common problem. The best way to deal with it is to not close the php tag (its optional automatically included by php when it reaches the end of file) : -- start of file --

Re: problem on belongsTo many models

2007-02-07 Thread RichardAtHome
If I'm understanding correctly: You will need to set up two associations: in model equipment: $belongsTo = array('school', 'area'); (make sure the school and area arguments above appear in the same order as their school_id and area_id in the table) On a related note, I'm not sure that's the

Re: OT - Q for PHPNut on DBDesigner 4 - Was: ER Tools

2007-01-29 Thread RichardAtHome
If there is a trick, perhaps you could share it with the list? If you double click the relationship (the line connecting the tables), you can edit the name of the field DBDesigner uses for the foreign key. (took me a while to work this one out too)

Re: OT - Q for PHPNut on DBDesigner 4 - Was: ER Tools

2007-01-29 Thread RichardAtHome
Grrr... still getting used to the new google groups gui. Didn't see the 2nd page of replies... On Jan 29, 3:09 pm, RichardAtHome [EMAIL PROTECTED] wrote: If there is a trick, perhaps you could share it with the list? If you double click the relationship (the line connecting the tables

Re: CakePHP Reference Project

2007-01-23 Thread RichardAtHome
Some great comments for all concerned :-) I haven't had a look at Cheesecake-Photoblog yet, but judging by its feature list and a (very quick look at the code) I certainly will be! I'm not trying to steal anyones thunder here. tbh, my reasons for getting the project underway are pretty selfish.

Re: CakePHP Reference Project

2007-01-23 Thread RichardAtHome
I think I might have come up with a possible application: A forum. This seems to tick all the required boxes and I particularly like the idea of building it to be embedded in another cake application or run stand-alone. I've had a look on cakeforge and the only other forum related project is

Re: Unoffical API / Beta RFC [new]

2007-01-22 Thread RichardAtHome
Tarique, I'm definitely not 'copying out' ;-) I'd love to contribute to CakePHP as I believe its the best thing to happen to PHP in all the time I've been programming with it (since PHP3). I was trying to illustrate that perhaps, if the documentation was available then the learning process

Re: Unoffical API / Beta RFC [new]

2007-01-22 Thread RichardAtHome
tbh, I wasn't being off topic (kinda ;-). Jippi was asking what people would like to see in a documentation project and I answered: Example code. It snowballed from there. I'm definitely not having a dig at all the hard work done by everyone on the CakePHP project. If I didn't think it had

CakePHP Reference Project

2007-01-22 Thread RichardAtHome
Ok, I've had my moan about the documentation for cake ;-) Time to do something about it. I'd like to create a 'Reference' Project and associated documentation. Something that uses best practices and incorporates all the common elements a commercial cake project would call on and illustrates how

Re: CakePHP Reference Project

2007-01-22 Thread RichardAtHome
Another thing to add to the list of components: Email --~--~-~--~~~---~--~~ 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,

Re: CakePHP Reference Project

2007-01-22 Thread RichardAtHome
Thanks for the feedback so far :-) I am, by no stretch of the imagination a Cake guru (this is why I'm starting this project). What I am planning on doing is to post first drafts of code as I understand they should be written to this group and get advice/tweaks/feedback. Hopefully, by the end

Re: Good idea to combine edit.thtml and add.thtml?

2007-01-21 Thread RichardAtHome
If you set the action property of the form to empty ( ) then the form will post back to the page that it was rendered on. Handy if you are passing parameters through the url. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Admin Access

2007-01-21 Thread RichardAtHome
php functions can have many returns. Proccessing stops (and returns) at the first one the program logic reaches: ?php switch ($a_number) { case 1: return one; break; case 2: return two; break; default: return not one or two; break; } (note: those breaks

Re: How to handle multipe hasOne?

2007-01-21 Thread RichardAtHome
Should be: var $hasOne = array ( Author = array(classname = Author, dependent = false, foreignKey = book_id), AssistantAuthor =

Re: Unoffical API / Beta RFC [new]

2007-01-21 Thread RichardAtHome
Kudos for ralph who elequently illustrated my *only *problem with CakePHP. Cake is a top bit of coding. Seems to do so much of what I want, but the practical documentation is lacking. Code examples are crutial. Even generic ones. Specific ones are even better. No-one comes to Cake without a

Re: Data Modelling

2007-01-19 Thread RichardAtHome
You would break the rules of database normalisation if you linked the users to the company. You would be duplicating data. Note: Breaking the rules of database normalisation will not condemn your soul to an eternity in the pit - sometimes the real world gets in the way of a perfect ideal. An

Re: Data Modelling

2007-01-19 Thread RichardAtHome
and Branch belongsTo Company (without that, there's no correlation Company and Branch) and again you'd be duplicating information ;-) You could get a list of branches for each company via the users table Get branches for company: SELECT DISTINCT branches.id, branches.name FROM branches

Re: idea: trace things into a log window

2007-01-19 Thread RichardAtHome
You can also use the windows build of the *nix command tail to monitor the log file: http://tailforwin32.sourceforge.net/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group,

Re: Component vs. AppController vs. requestAction

2007-01-19 Thread RichardAtHome
Just want to take an opportunity to thank you for the support you give everyone here. Hear, hear! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: help

2007-01-18 Thread RichardAtHome
http://localhost/~username/users/action Most action pages require an ID of the object (record) the action is to be performed onso the URL looks lilke: http://localhost/~username/users/action/1 What happens if you go to: http://localhost/~username/users/ ? If you are getting a 404 error,

Re: OT - Q for PHPNut on DBDesigner 4 - Was: ER Tools

2007-01-14 Thread RichardAtHome
Yup, works fine with Windows :-) (I pretty much use it every day) --~--~-~--~~~---~--~~ 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

Re: Simplify foreach() - unpleasant array

2007-01-10 Thread RichardAtHome
Grant Cox wrote: Using $reservation['Reservation']['number']; is correct. This is because each retrieved row may have associated models - ie $reservation['Room'] etc. Ah, another chink of sunlight just broke through the clouds :-) I was going to ask this same question myself. My

Re: Beginners Only Tutorial that was on the WIKI

2007-01-10 Thread RichardAtHome
I found the following tutorial very helpful: http://www-128.ibm.com/developerworks/edu/os-dw-os-php-cake1.html (if free to view, but requires registration - check out the other two parts too) Got me over the initial learning hump and well on the way to producing a 'real' application.

International PHP Magazine Poll:Best PHP Framework

2007-01-10 Thread RichardAtHome
Congratulations to everyone responsible for making CakePHP happen! http://www.php-mag.net/magphpde/magphpde_news/psecom,id,26752,nodeid,5.html 'CakePHP' has beaten all its competitors with a majority of 78.5% votes taking home the title of the best PHP MVC Framework. Next in line is 'Sympony'

Re: OT - Q for PHPNut on DBDesigner 4 - Was: ER Tools

2007-01-10 Thread RichardAtHome
Another (minor) problem with the otherwise excellent DBDesigner is that it uses MySQL old passwords. This means that once you create your MySQL User, you then need to run the following sql before you can connect with DBDesigner: SET PASSWORD FOR 'some_user'@'some_host' = OLD_PASSWORD('newpwd');

Nice overview of Cake (with examples)

2006-07-12 Thread RichardAtHome
Just thought I'd draw your attention to a new article over on sitepoint: The CakePHP Framework: Your First Bite - http://www.sitepoint.com/article/application-development-cakephp It's a nicely written introduction to CakePHP. It only covers very basic first principles (it lightly glosses over

Cake Software Foundation Certification

2006-06-01 Thread RichardAtHome
From the Cake Software Foundation Certification page ( http://www.cakefoundation.org/pages/certification ) : and will be able to use the CakePHP trademark when promoting their services Does this mean non-certified developer wont be able to use the CakePHP trademark? If this is true what about

<    1   2   3