My client is complaining that she posts a form and gets kicked to her
login. I have the following code in `app/config/core.php`:
Configure::write('Session.timeout', '12000');
Configure::write('Security.level', 'low');
Sessions should last 1,000 hours with these settings, right? So what
el
Any luck figuring this one out?
On Nov 5, 3:15 am, Raph wrote:
> Hello,
>
> Let's say I have a model Model1 with fields 'name' and 'date' and I
> have a Model2 with field 'name'. Model1 is in relation 'hasMany' with
> Model2. How should I use saveAll() method with "fieldList" parameter
> if I onl
I wish I could figure this one out too.
On May 30, 6:09 am, Dashman wrote:
> Hi guys
>
> I wasted my Friday evening and early Saturday morning trying to sort
> this one out, but to no avail.
>
> I have created a plugin to be used as a CMS, the plugin is called
> "admin". I have been able to
Is there any way to execute an SQL file that you've saved to App/
config/sql?
--~--~-~--~~~---~--~~
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 unsubscr
Is there any way to know if a model exists if you have the name of it
in a string?
--~--~-~--~~~---~--~~
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 uns
Okay, thanks.
By the way, there is nothing about recursion on that page.
On Apr 17, 4:22 pm, AD7six wrote:
> On Apr 17, 11:49 pm, mattalexx wrote:
>
> > 'all joins the other table and doesn't give me an error. 'list' on the
> > other hand, does n
'all joins the other table and doesn't give me an error. 'list' on the
other hand, does not join the table and therefore 'array
('Property.mls' => '80578'),' is not available.
On Apr 17, 3:41 pm, fain182 wrote:
> > PropertyImage hasOne Property.
>
> > Why can't I do this:
>
> > > // APP/control
That returns a record, not one string, right?
On Apr 17, 3:38 pm, fain182 wrote:
> > > $result = mysql_query('SELECT single_field FROM table WHERE id = 1
> > LIMIT 1');
> > $single_field_value_of_record_1 = mysql_result($result, 0,
> > 'single_field');
> > ?>
>
> $single_field_value_of_record_1
efinition contains Property model name, not
> PropertyImage model name.
> John
>
> On Apr 17, 6:29 am, mattalexx wrote:
>
> > PropertyImage hasOne Property.
>
> > Why can't I do this:
>
> > > // APP/controllers/properties_controllers.php
>
Is there any way to recreate something like this?
--~--~-~--~~~---~--~~
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
PropertyImage hasOne Property.
Why can't I do this:
PropertyImage->find('list', array(
'fields' => array('id'),
'conditions' => array(
array('Property.mls' => '80578'),
),
));
debug($check_property_images);
?>
But when I use find('all') it
For anyone that's interested, I decided to go a completely different
route:
http://www.sitepoint.com/forums/showthread.php?t=608370
On Mar 19, 1:49 pm, Miles J wrote:
> Oops I meant to say "Your not able to pass controller data to the
> behavior". I was thinking something like this.
>
> In the
t checks expiration and put it in the
> beforeFilter ...
>
> On Mar 23, 8:20 am, aman batra wrote:
>
> > I think it is a good practice to have a function in User model that
> > should serve the required purpose than any other approach.
>
> > On Mar 22, 2:22 pm, ma
0, 7:27 am, brian wrote:
> Can you add a PK to the table? Create a new table with the same
> columns plus an auto_increment/serial/whatever and insert the rows
> from the 1st table. Drop the 1st one, then rename the 2nd.
>
> On Thu, Apr 9, 2009 at 10:45 PM, mattalexx wrote:
>
> &
n your shells?
>
> -Mark
>
> On Apr 11, 4:42 pm, mattalexx wrote:
>
> > Is there anyway to not display the header?:
>
> > Welcome to CakePHP v1.2.2.8120 Console
> > ---
I am trying to output Spanish characters (in this example, "ñ"):
[CODE]
class CronShell extends Shell {
function daily() {
$this->out(Configure::read('App.encoding'));
$this->out('Peñasco');
}
}
[/CODE]
This is what I get:
[CODE]
Welcome to CakePH
Is there anyway to not display the header?:
Welcome to CakePHP v1.2.2.8120 Console
---
App : app
Path: /path/to/app
---
--~--~-~--~~~---~--~~
Yo
Thank you!
On Apr 10, 8:42 pm, brian wrote:
> $this->out(
> sprintf(
> 'foo is %s',
> $bar
> )
> );
>
> On Fri, Apr 10, 2009 at 10:27 PM, mattalexx wrote:
>
> > Sometimes my shell method will run for
Sometimes my shell method will run for a long time. I'd like to be
able to output something as it runs instead of after it ends.
Is this possible with CakePHP?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP
Hi
I am trying to access a database table that was built without a
primary key (I know). How would I go about this in CakePHP. Is it
possible or do I have to just use Model::query all the time?
--~--~-~--~~~---~--~~
You received this message because you are subscri
Page is also attached to a bunch of other things. I want to grab a
page and everything else.
On Apr 5, 11:39 pm, mscdex wrote:
> Why not also have PageSnippet belongs to Page? That way you can then
> just do a find on PageSnippet instead and get the associated Pages.
--~--~-~--~~
Hi.
Page has many PageSnippets. When I use Model::find() to grab the
pages, I'd like to only get pages that have associated page snippets.
Is this something I should handle in the model or in the Model::find()
method?
Thanks
--~--~-~--~~~---~--~~
You received this
Okay, "App" is reserved so I changed it to "MyApp".
On Mar 23, 9:06 pm, mattalexx wrote:
> Thank you for you suggestions. From Martin's suggestion, I thought I
> would do this:
>
> app/config/app.php:
> $config['App']['base_url'] =
am, brian wrote:
>
> > OK, I think I misunderstood you. In any case, you should have access
> > to the constants WWW_ROOT, WEBROOT_DIR, etc. Have a look at
> > ShellDispatcher class, for instance. But I have no experience with an
> > app dir in a subdirectory of
Thank you for your response.
On Mar 22, 7:04 pm, brian wrote:
> On Sun, Mar 22, 2009 at 7:14 PM, mattalexx wrote:
>
> > Hello,
>
> > I am trying to find a function or constant that will reliably give me
> > the app's base URL, even when I'm in a shell and
I'm sending e-mails to users. These e-mails contain links to the app.
On Mar 22, 7:04 pm, brian wrote:
> On Sun, Mar 22, 2009 at 7:14 PM, mattalexx wrote:
>
> > Hello,
>
> > I am trying to find a function or constant that will reliably give me
> > the app'
Hello,
I am trying to find a function or constant that will reliably give me
the app's base URL, even when I'm in a shell and there's no HTTP being
spoken and therefore there's a limited $_SERVER var.
Am I going to have to write my own Configure value? It seems like such
basic info, the URL of y
Nevermind, found it!
http://book.cakephp.org/view/437/primaryKey
On Mar 22, 4:06 pm, mattalexx wrote:
> Hi everyone. For some reason, I can't find what I'm looking for in the
> docs. I am trying to write a model file for a Phorum table,
> "phorum_users". The ID fi
Hi everyone. For some reason, I can't find what I'm looking for in the
docs. I am trying to write a model file for a Phorum table,
"phorum_users". The ID field in this table is "user_id" instead of
"id".
I know this is an extremely noob question, but how do I specify the
alternate name for the ID
Thank you.
On Mar 21, 11:51 pm, mscdex wrote:
> Sorry, I half-misread your situation.
> In my opinion, I would probably add a deactivateExpired function in
> the User model that would do the necessary checking and saving.
--~--~-~--~~~---~--~~
You received this me
I have a table full of users. Each record has an "expiration" datetime
field. I have a shell script that checks to see if there are users
who's accounts have expired and deactivate them. So here's the
process:
1. Get all users who's accounts have expired but are still marked
active.
2. Mark them
Something like this?
loadModel('IndustryLink');
$this->IndustryLink->actsAs['Thumbnail'] = array('image', 294, 200);
$industry_links = $this->IndustryLink->find('all', array(
'conditions' => array('IndustryLink.active <>' => '0'),
));
?>
This seems to work, but is there a better
I have a table named 'IndustryLinks'. Each record in that table
corresponds to an image file of the company's logo. I store these
image files in a directory on the server's filesystem.
I have created (rather, I'm trying to create) a behavior class to
handle the action of thumbnailing these image
he Set class. Have a look through its methods
> (note that not all of them are represented here so check the API,
> too).
>
> http://book.cakephp.org/view/640/Set
>
> That's about as much as I can tell you, though. Anything I suggest
> could probably be done much simpler.
>
Hello,
Model relationship: Page has many PageSnippet
I have this code:
[code]
$page = $this->Page->find('first', array(
'conditions' => array('Page.key' => 'home'),
));
[/code]
It's outputting this array:
[code]
Array
(
[Page] => Array
(
[id] => 1
l
>
> On Mar 11, 11:52 am, Xoubaman wrote:
>
> > Just model it like a normal HABTM relationship, no special syntaxis,
> > and add the field in the database.
>
> > When saving, try this:
>
> >http://teknoid.wordpress.com/2008/09/24/saving-extra-fields-in-the-jo
; different alias-names for this model
>
> On Mar 11, 11:52 am, Xoubaman wrote:
>
> > Just model it like a normal HABTM relationship, no special syntaxis,
> > and add the field in the database.
>
> > When saving, try this:
>
> >http://teknoid.wordpress.com/2008/
What's the syntax for adding an "extra field" to the
$hasAndBelongsToMany var?
Thank you for you response.
On Mar 11, 2:43 am, Xoubaman wrote:
> You can model it like a normal HABTM relationship with an extra field
> named main_photo.
>
> On Mar 11, 8:30 am, mattalex
My articles have and belong to many photos. This is so when the photo
is seen somewhere else on the site, I can have a "see related
articles". Each article also has one main photo. I can't seem to
figure out the syntax for this in APP/models/article.php file and in
APP/models/photo.php.
--~--~---
39 matches
Mail list logo