Just for curiosity, have you tried retrieving the data from the other
end of the relationship - from the Offer side?
$this->Offer->find(
'all', array(
'contain' => array('Venue'),
'conditions' => array('Offer.end_date >' => $time)
)
);
Use $this->Venue->Offer->find( if you are i
Yes, exactly :) Using CakePHP models, the result is:
Location hasMany Job
Location hasMany Shop
But are each Job independent of Shop?
Enjoy,
John
On Jan 10, 1:31 am, loke wrote:
> Or may be, I do not even need a reference table in the middle, because
> there is a singular relationship between
Have you checked out the latest tool created by WidgetPress? It
integrates iPhone app development with a CakePHP generator. Check it
out at http://widgetpress.com/.
I haven't used it yet, but I have used ModelBaker to good success.
It might prove interesting...
On Jan 9, 10:49 am, BrendonKoz w
Files show up in the cache folder as default_country_cache or
default_state_cache
Cache::config('default', array(
'engine' => 'File',
'duration'=> '+1 hours',
'prefix' => 'default_',
'path' => CACHE
));
Cache::config('short', array(
'engine' => 'File',
Hi Everyone, thanks very much for the replies.
The sub query is the only one that worked for me. I have the acts as
containable statement in my app_model. I think i need to move the
condition statement out of contains and into the main contains
statement to limit the venue selection to venues w
Your current config has all path set to CACHE, so all the cache files will
be written to the cache folder, try setting diferent 'prefix' settings so
you can check which configuration is being used.
Regards
Pablo Viojo
pvi...@gmail.com
http://pviojo.net
¿Que necesitas?
http://www.needish.com
On
I noticed that an changed it to the cookbook example:
$state_cache = Cache::read('state_cache', 'short');
if ($state_cache !== false)
{
$state_cache = $this->getStates();
There's an error in your code:
if ($state_cache !== false) should be
if (empty($state_cache)) or something like that.
Change it and try again.
Regards
Pablo Viojo
pvi...@gmail.com
http://pviojo.net
¿Que necesitas?
http://www.needish.com
On Sat, Jan 9, 2010 at 9:06 PM, Dave wrote:
> Nope
Nope, nothing happened.
I have a folder inside cache called long and its empty. Noting saved to it.
Any other ideas?
$state_cache = Cache::read('state_cache', 'long');
if ($state_cache !== false)
{
Try passing the config as third param when writing and second when reading:
Cache::write('state_cache', $state_cache, 'long');
Cache::read('state_cache', 'long');
HTH!
Regards,
Pablo Viojo
pvi...@gmail.com
http://pviojo.net
¿Que necesitas?
http://www.needish.com
On Sat, Jan 9, 2010 at 8:20
Or may be, I do not even need a reference table in the middle, because
there is a singular relationship between each pair of models. So
storing the id of the location in each table should be enough to refer
to the correct location. It is a many-to-one relationship.
Thanks
Loke
On Jan 9, 6:27 pm,
Well, the situation is like this:
Locations(id, location_info) is an independent table to store all
relevant locations.
Jobs (id, name, location_id) is a table that has exactly one location
for each job, and stores the location_id from location(id).
Shops(id, name, location_id) is another table tha
This is my first attempt at caching a model find() and was hoping for a
little info.
Cache::write('state_cache', $state_cache);
So I check server cache folder and see a file called cake_state_cache which
contains:
1263079575
{i:15;s:7:"Alabama";i:14;s:6:"Alaska";i:17;s:7:"Arizona";i:16;s:8:"Ark
Im new to cakephp but I love the concept thus far. I understand how to
create views and change the default layout but its unclear to me how
to make different layouts with different images and css.
My question is... I want to build an application that is designed like
the following...
LAYOUT1: (pu
Yeah, you can check Auth->allow and deny methods. They're great.
On Sat, Jan 9, 2010 at 00:43, euromark wrote:
> take a lock at
> $this->params
>
> you can do that with
> pr() which prints out the array as long as you are in debug mode
>
> there is
> - controller: $this->params['controller']
> -
Yes, that is correct. I suppose it can easily be likened to a text
message, except there's no fee associated with it (other than the
immediate and upfront purchase of the application to run on the
phone). There are 3 fields that (can) get sent to the device:
Application Name, Event, and Descripti
I'm doing an auctions website (not for any institution, just as part of my
learning of php and cakephp). At Home page I have all the items displayed.
What I need to do now is to refresh price / last licitation and time
remaining in each item when any user makes a licitation.
So do you know how can
Did anyone try to integrate AJAX Chat - on open source chat
application - into an exisiting cake project? like a community site or
a forum?
i found out that there are several custom chat mods available for it
(like phpBB etc), but i coudn't quite figure out how to configure for
cake settings (sess
18 matches
Mail list logo