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
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
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
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
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
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.
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'));
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/
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')
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 --
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
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)
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
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.
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
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
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
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
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,
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
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
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
Should be:
var $hasOne = array (
Author =
array(classname =
Author,
dependent = false,
foreignKey = book_id),
AssistantAuthor =
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
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
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
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,
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
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,
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
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
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.
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'
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');
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
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
201 - 236 of 236 matches
Mail list logo