Hi,
Yes, businesses table has id (PK), name, account_id and a whole heap of other
fields. The accounts table only has id (PK), name, and testing if I have it
there (I don't really want it, it's just for testing)
Cheers ;)
From: ramonmaruko
To: CakePHP
Sen
Does your 'businesses' table have at least the following fields
columns:
id (PRIMARY KEY)
name
account_id
and the accounts table:
id (PRIMARY KEY)
name
On Feb 14, 1:33 pm, Chris Mc wrote:
> OK, so I thought I had the association (ie relationship) part pretty
> much sorted, and I'm following t
OK, so I thought I had the association (ie relationship) part pretty
much sorted, and I'm following the logic that I used before when
creating a State/City example and it's working great most of the time.
But I have this problem, and I'm not sure why:
In English terms, a Business can have an Acco
On Fri, Feb 13, 2009 at 10:12 PM, tatebn wrote:
>
> I'm new to using bake and I'm having a small issue. I have a parent
> table with one to one relationship with about 5 other tables. So I'm
> assuming I need to use a hasONE relationship. When I use bake it
> automatically assumes a hasMany relat
Try this:
'contain' => array('Event' => array( 'Eventtype.id',
'Eventtype.eventName'))
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
T
I got user has many event, event belongsTo eventtype and user,
eventtype has many event
make sense? did I set this up right?
I trying to fetch all the data for one event.
Following the example in the cookbook, I tried this:
$this->User->find('all', array(
'conditions'
about_controller index action will automatically become /about/.
You only do routes if you want custom looking urls that cant be done
using the controller/action setup.
On Feb 13, 6:29 pm, Mark Thien wrote:
> Hi guys,
>
> I tried to use cakephp routes function but I just couldn't get it to
> wo
Hi guys,
I tried to use cakephp routes function but I just couldn't get it to
work. I have read thru the documentation at
http://book.cakephp.org/view/46/Routes-Configuration
but there isn't any simple complete example.
What I want is just, for example, I have a page like about.php. I want
cake
I tried adding an :id just to see what it would do, and it still didnt
convert.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubs
I'm new to using bake and I'm having a small issue. I have a parent
table with one to one relationship with about 5 other tables. So I'm
assuming I need to use a hasONE relationship. When I use bake it
automatically assumes a hasMany relationship. What do I do about this?
I noticed that the same f
Again, use Containable. Where you get the idea that using the
'contain' option "adds more things to do" I'm not sure. It's certainly
made my code a heck of a lot tidier and simpler to understand.
I bow in the general direction of whomever wrote that (Mariano?)
On Fri, Feb 13, 2009 at 6:36 PM, Ar
like this?
var $paginate = array(
'sort' => array(
'date' => 'DESC',
'hours' => 'DESC'
),
...
On Fri, Feb 13, 2009 at 5:03 PM, websurfshop wrote:
>
> I have searched the archives on the board, the cookbook, and even
> looked at the pagination source file but can not figure out a
Are you referring to the Cake core? I don't think that would be a very
good idea at all. You'd be facing potentially major breakage. That's
not a swipe at Cake, but you have to understand that some changes will
possibly require updates to your own code. And, hey, bugs happen.
Better to test *exten
I suggested a slug because it's likely you'll eventually have a
multiple-word title.
As for pass, the problem is that your route doesn't have an ID to pass:
Router::connect('/games/view/:title' ...
On Fri, Feb 13, 2009 at 4:00 PM, Miles J wrote:
>
> Title basically is slug. But if i do the "pa
Anyone else have an idea?
On Feb 13, 10:34 am, "Arak Tai'Roth" wrote:
> I don't think that would help, and adds more things to do when as far
> as I know, this should work fine. I will detail my problem a little
> more here:
>
> I have three models, Build, Status, and Phase (or Builds, Statuses,
Worked. Thx for the help. For future reference below is the code from
my action method and custom paginate and paginateCount methods.
Please let me know if I am doing something incredibly wrong.
//Action method from Candidate controller
function list() {
$desiredRating = 1;
$desi
I have searched the archives on the board, the cookbook, and even
looked at the pagination source file but can not figure out an answer
(I'm not very good at this stuff). I have a model/database table/
baked views application that is named hours and has fields "id",
"date", and "hours".
I want t
This seems to be more of a view/css problem than controller
pagination.
Especially since it relates to layout and not the actual data.
You still have your 20 records from your (4x5) grid.
The way to solve this is in your view look at your column set of 4 and
iterate your items setting the class of
There is a property which is part of model called $useDbConfig.
>From a controller you can call or set it like:
$this->model->setSource('mydbConfig');
To get the current model dbConfig call
currentconfig = $this->model->getDataSource();
If your storing your config info in database1. you would bui
Title basically is slug. But if i do the "pass" array, it should pass
the variables (both of them) to the action.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to c
All I call in my AppController beforeFilter() is this:
$l10n = new L10n();
$l10n->get($locale);
Cake takes care of all the rest. And as for file structure:
// default.po
// __('login');
msgid "login"
msgid "Login"
// homepage.po
// __d('homepage', 'welcome');
msgid "welcome"
msgstr "Welcome"
Here you go, this works perfectly. I currently use it on my site.
http://www.milesj.me/resources/script/commentia
Made by me of course, any questions let me know.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Cak
I have a couple projects that have been deployed to multiple clients/
locations.
I'm finding it a pain to keep them all updated, so I wanted to make a
plugin that would allow me to visit an updates page on the installed
site and it would check for updates to the currently installed
version.
I've
Dear All,
Eve of sacred moment, the v-day, hav my love regards 2 all.
I have just joined this illustrious group and feeling comfortable
imagining that now i've so many friends in this community 2 help me
sorting out probs that i face in baking cake.
So, I want to do pagination in cakephp not wi
http://groups.google.com/group/cake-php/browse_thread/thread/b760aa1018de12d7
This might clear things up a bit.
Good luck!
On Feb 13, 1:43 pm, Ithaka wrote:
> Hi everyone,
>
> I have just released a a website to production and now we want to use
> multiple applications within that site. What
Hello everyone! I'm New to cake and slowly getting the hang of it.
I am building a multilingual site (en/fr) with a small reservation
app. I would like to get familiar with cakes localization capability
first before getting too far into development. I have read many posts
in this group and looke
In my controller I first need to query a database which holds
information about which database all of the models should use. I'm not
sure how to do this.
When the models get initialized by the uses array I haven't yet
determined what database they should use.
Any clue in which direction I should
ugh wrong link, here you go:
http://groups.google.com/group/cake-php/browse_thread/thread/eacfade1d52c9071/f5e3c395037043b3
On Feb 13, 2:13 pm, Ithaka wrote:
> I believe i have found what i was looking for. But it is still not
> working correctly. I'm assuming something else is not working
> c
The situation: for NewslletterController::admin_edit() I need to fetch
all of the Posts that have been made since the previous Newsletter was
published. I've got an SQL view which accomplishes the task but I'd
really like to take advantage of Cake's find(). Currently, I can only
use query().
News
It was a routing issue. I managed to piece it together when the 'edit'
function of the same controller was acting bizarrely. Once I fixed the
routing, everything worked as expected.
On Feb 13, 1:13 pm, brian wrote:
> This seems like a routing issue. What's the route you're using for this?
>
> An
ahh. yea i never thought of it that way; however, the issue goes
beyond that. How about for the purposes of SSL. If SSL is enabled on
www.x.com then it will not work on x.com. So in some cases you have no
choice. Unless you want to change your SSL.
Also if sessions/cookies understood that there a
Hello,
probably I'm not understanding nothing about how cakephp manage l10n.
Why when I enable the component Auth the function $this->L10n->get
('some language') doesn't work?
With Auth disactivated all work fine.
Thanks,
Marco
--~--~-~--~~~---~--~~
You received
This seems like a routing issue. What's the route you're using for this?
And, are you certain that the both servers have an identical routes.php?
On Fri, Feb 13, 2009 at 1:07 PM, Tony Thomas wrote:
>
> I moved my CakePHP app to a new server and everything is working fine
> except the one area w
I believe i have found what i was looking for. But it is still not
working correctly. I'm assuming something else is not working
correctly.
For those that are curious about have multiple databases in the
controller, go here: https://trac.cakephp.org/ticket/1064
--~--~-~--~~---
Martin,
I tend to agree with you that the rss folder is basically to have two
views of the same name but different types.
Like you said, since I'm only catering one view with the rss_feed
action, it isn't all that important to have it in the rss folder.
However if I move the view file one level up
Hi everyone,
I have just released a a website to production and now we want to use
multiple applications within that site. What I want to know is, is it
possible to tell the controller to select which db config to use?
Because right now, i have the new application in the website and when
i try t
On Feb 13, 11:30 am, RichardAtHome wrote:
> How do I stop Cake from trapping errors so I can use my own error
> handler, and how do I re-enable Cake error handling after the bit of
> code I want to check has finished?
You can implement your own custom handler that extends Cake's
ErrorHandler cla
I moved my CakePHP app to a new server and everything is working fine
except the one area where I have to allow public access.
The controller I want to allow is 'report', so in the pertinent
controller, I have this:
function beforeFilter() {
$this->Auth->allow('report');
One note I forgot to mention:
the $useDbConfig had moved from the Controller to the Model at some
point in version 1.2 so if you have problems with setting it from the
controller you may need to move that check logic to the appmodel or
from the controller you could set it using:
$this->Model->setD
Thanks Miles, found it at last!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+u
Conditional comments are the way forward. The user agent can be
spoofed.
On Feb 13, 11:37 am, Marcelo Andrade wrote:
> On Fri, Feb 13, 2009 at 7:17 AM, mona wrote:
>
> > hi viewers
>
> > i have one serious problem i have to set the page layout in such a way
> > that my website should perfectly
Hi majna,
I think, jorgtron wants a result like this:
http://www.w3schools.com/rss/rss_tag_image.asp
RoVo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-p
I don't think that would help, and adds more things to do when as far
as I know, this should work fine. I will detail my problem a little
more here:
I have three models, Build, Status, and Phase (or Builds, Statuses,
and Phases), they are linked in this manner:
class Build extends AppModel
{
HI¡, anything know some plugin to implement ACL whit cakephp?, please I need
it
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubs
Hi All :-)
How do you trap errors that may be the result of a custom query? For
example:
$results = $model->query($sql);
In my case, some of the custom sql queries creates such a large
dataset that the script exceeds the memory allocated to php.
I would like to catch these errors and present s
This kind of bug is best discovered by isolation.
You need to think of ways you can swap out and isolate specific pieces
of all the technologies.
Since it seems to be something in the model logic, sql or database
(data). I would first try a simple test of pointing the live site db
to your dev db.
Yes i'm looking for spam-protection, for comment spam. But i don't
know anything about akismet. I search a tool that is easy to use and
good again, so i tried the Improved Captchas... But it doesn't run...
Why? I dont't know...
What do you think about such mathematical protection like?
Whats 5+6
On Fri, Feb 13, 2009 at 12:34 PM, marco.rizze...@gmail.com
wrote:
>
> How can I enabled readonly for this field?
> I would use $form->input helper function
> I try to set echo $form->input('name',array('readonly'=>true)); but it
> doesn't work
I think the correct is:
echo $form->text('name', arr
I ask you another question.
In this form I have two select. The possible values of second select
depends from the value of a field of my model.
I get the possible values of this select at the end of the edit
action.
Now I the subit works correctly the second select has the correctly
value.
Instea
On Fri, Feb 13, 2009 at 11:28 AM, marco.rizze...@gmail.com
wrote:
>
> Hi
> I have a form.
> Inside this form I have a field disabled but with a value.
> When I post form but in the form there are errors when the form is
> reloaded qith the errors the disabled field is empty.
> How can I correct t
How can I enabled readonly for this field?
I would use $form->input helper function
I try to set echo $form->input('name',array('readonly'=>true)); but it
doesn't work
On Feb 13, 4:30 pm, Marcelo Andrade wrote:
> On Fri, Feb 13, 2009 at 11:28 AM, marco.rizze...@gmail.com
>
> wrote:
>
> > Hi
> >
If you're using a commercial product, contact the vendor and ask for
an updated copy.
On Feb 13, 8:20 am, Paamayim wrote:
> > > But, you really should see this as a very good excuse to update your
> > > core to the current version and deal with the tweaks you may find
> > > necessary in your cod
Have a look here:
http://teknoid.wordpress.com/2008/09/04/findlist-with-three-or-combined-fields/
On Fri, Feb 13, 2009 at 5:06 AM, Sensible wrote:
>
> Hi,
>
> $this->Model->find('list')...works perfactly.
>
> But i have model customer which have two fields firstname and last
> name and
> i want
On Thu, Feb 12, 2009 at 5:57 PM, Miles J wrote:
>
> Im trying, for example, to get this:
>
> /games/view/123/Starcraft
>
> To route to:
>
> /games/view/Starcraft
>
> But still pass the id to the action. Heres my route, but its not
> working:
>
> Router::connect('/games/view/:title', array('contro
I had a feeling that was your specific reasoning, and it makes
sense. ...and yes it does. ;)
On Feb 13, 3:05 am, Martin Westin wrote:
> I know I should have posted there. :) I wanted to post here since I
> have a feeling some of the (quite few) intended readers would not be
> frequenting tho
On Thu, Feb 12, 2009 at 1:56 PM, Jesse wrote:
>
> This almost works, but I get an error when I add the 'recursive' => 2.
>
> Here is the error.
>
> Warning (512): SQL Error: 1054: Unknown column
> 'OnsaleCouponsOnsaleCouponsCategory.onsale_coupons_category_id' in
> 'where clause' [CORE/cake/libs/
If $this->data is set then the form fields should be re-populated when
the view is rendered again. Just make sure you don't change that
variable in your controller action. Here's a basic example:
public function admin_add()
{
if (!empty($this->data))
{
if ($this->P
Hi
I have a form.
Inside this form I have a field disabled but with a value.
When I post form but in the form there are errors when the form is
reloaded qith the errors the disabled field is empty.
How can I correct this?
Many Thanks
--~--~-~--~~~---~--~~
You receiv
Are you talking about comment spam?
If so, you might want to look at integrating Akismet into your app -
The folks at Debuggable have done some work on this - http://bit.ly/vdv9h
On Feb 13, 7:44 am, amarradi wrote:
> Hello together,
>
> i'm looking for a good spam-protection. I tried
>
> http
Thanks for your answers.
It appears that the problem occures with special characters and
accents.
But I don't know how to solve that.
Any idea ?
Thanks.
Ed
On 13 fév, 11:00, grigri wrote:
> Hi Ed,
>
> Some browser (eg FF) may override the contents of the form fields on
> page load.
>
> Check
> > But, you really should see this as a very good excuse to update your
> > core to the current version and deal with the tweaks you may find
> > necessary in your code.
>
> but that's always good advice.
Obviously it should. But I purchased a software and only later when I
had to made some addo
Hi Ed,
Some browser (eg FF) may override the contents of the form fields on
page load.
Check the generated source code and see if the `value` attribute is
correctly and consitstently filled. It it is, then your cake code is
fine. You can force the browser to use the values you specified by
calli
Hello together,
i'm looking for a good spam-protection. I tried
http://bakery.cakephp.org/articles/view/improved-captcha-component
but with this component i had some Problems, please look in this
thread.
http://groups.google.com/group/cake-php/browse_thread/thread/1e313f6904b37f1e
So now is t
On Feb 12, 9:07 pm, mscdex wrote:
> The "cake" option is pretty much the same as the "php" option except
> that it tells PHP to store the session files in /app/tmp/sessions
> instead of PHP's default location. The "cake" option also sets a
> couple other PHP session options, but it's basically th
Hello,
Here my strange problem :
I have got o simple form with one table.
The add works well, like the view mode. That means, data is saved
directly.
But in the edit mode, sometimes, a field appears blank.
Other times all fields appear with the right data.
I can't understand... and I tested in l
On Fri, Feb 13, 2009 at 7:17 AM, mona wrote:
>
> hi viewers
>
> i have one serious problem i have to set the page layout in such a way
> that my website should perfectly viewed in internet explorer . It is
> working fine in firefox but in IE it is not so can anybody tell me how
> to call two diff
Set::combine
On Fri, Feb 13, 2009 at 8:06 AM, Sensible wrote:
>
> Hi,
>
> $this->Model->find('list')...works perfactly.
>
> But i have model customer which have two fields firstname and last
> name and
> i want to display concatination of firstname and lastname in list.
>
> So, can any one sugge
On Feb 13, 9:28 am, Martin Westin wrote:
> If you are on that early version of 1.2, it is likely that you have
> encountered some bug in the Model/DSO parts of Cake.
Mmm misleading. IMO It is unlikely that the OPs problem is a core bug.
Some rudimentary debugging would confirm/discount that ra
Hi,
$this->Model->find('list')...works perfactly.
But i have model customer which have two fields firstname and last
name and
i want to display concatination of firstname and lastname in list.
So, can any one suggest me what is the solution for that.!
Thanks..
--~--~-~--~~
hi viewers
i have one serious problem i have to set the page layout in such a way
that my website should perfectly viewed in internet explorer . It is
working fine in firefox but in IE it is not so can anybody tell me how
to call two different css for two different browsers or any other
solution
hi viewers
i have one serious problem i have to set the page layout in such a way
that my website should perfectly viewed in internet explorer . It is
working fine in firefox but in IE it is not so can anybody tell me how
to call two different css for two different browsers or any other
solution
Feed exmaple:
Title
http://example.com/news/view/1
On Feb 13, 9:28 am, "jorgt...@gmail.com" wrote:
> anyone?
>
> On 12 Feb, 14:11, "jorgt...@gmail.com" wrote:
>
> > Hi, how can I insert images in my rss feed? I want one image to go
> > with
The request handler can help out a great deal with that kind of thing.
if ( $this->RequestHandler->isRss() ) {
$this->Auth->allow('index');
}
You can use the same "if" to make the rss version of an action return
only the last 10 items or only items from the last week or whatever
else you may
If you are on that early version of 1.2, it is likely that you have
encountered some bug in the Model/DSO parts of Cake. There are
probably quite a lot of tickets related to those areas of Cake fixed
between then and the release. 1.2 still had a few tings to fix there
when it was into the RCs.
Th
anyone?
On 12 Feb, 14:11, "jorgt...@gmail.com" wrote:
> Hi, how can I insert images in my rss feed? I want one image to go
> with each post.
> Here's the basic setup:
>
> foreach ($entries as $entry) {
> $postTime = strtotime($entry['Entry']['created']);
>
> $entryLink = array(
>
I know I should have posted there. :) I wanted to post here since I
have a feeling some of the (quite few) intended readers would not be
frequenting those pages.
I had forgotten about withcake so thank you for reminding me. I'll
post there too.
and it always feels good to be called intelligent :)
76 matches
Mail list logo