I am facing same kind of issue here.
I was working with counterCache - Cache your count().
In principle it work like a cake :)
But I have the following situation ...
Taking the same example given in the manual , what happens when I am
not deleting the image but only changing the Album.
Let's say
Play around with the Set::combine() or Set::extract() methods to get
the array into the right shape.
http://api.cakephp.org/class_set.html#80506e373d04c93eb4dc1582d8e5c09c
On 22 Sep 2008, at 06:26, ORCC wrote:
>
> Usually I create lists for using with $form->select(), vía
> find('list') method
Hi,
Is there any better practice of implementing a nicer-looking flash
redirect?
Many thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegrou
for something simple like this, you could use an IN ... find('all',
array('conditions'=>array('SomeModel.field'=>array($email1,
$email2)...
On Sep 21, 8:32 pm, . <[EMAIL PROTECTED]> wrote:
> Hi
>
> How would I do an OR in the conditions, such as the following? What's the
> correct syntax? Thanks
Yeah, get to know the containable behavior.
On Sep 21, 12:35 am, toby78 <[EMAIL PROTECTED]> wrote:
> I am currently evaluating different frameworks and also looking at
> cakePHP.
>
> My first thought was that it seems not very efficient...
>
> If you have an object, e.g. "User" that has other rel
http://book.cakephp.org/view/74/Complex-Find-Conditions
On 22 Sep 2008, at 09:32, . wrote:
> Hi
>
> How would I do an OR in the conditions, such as the following?
> What's the
> correct syntax? Thanks
>
> $messages = $this->Message->find('all',
> array('conditions'=>array('Email.email'=>$ema
Hi
How would I do an OR in the conditions, such as the following? What's the
correct syntax? Thanks
$messages = $this->Message->find('all',
array('conditions'=>array('Email.email'=>$email1 OR
'Email.email'=>$email2)));
--~--~-~--~~~---~--~~
You received this me
http://book.cakephp.org/view/510/Sites-in-the-wild
Take special note of the Mozilla Add-ons portal, one of the most
heavily trafficked in the world.
On Sep 21, 2:35 am, toby78 <[EMAIL PROTECTED]> wrote:
> I am currently evaluating different frameworks and also looking at
> cakePHP.
>
> My first
What is your controller code? are you using json_encode in it?
something like this ---> echo json_encode($this->Model-
>find('all'));
On Sep 21, 7:24 pm, jkritikos <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> I'm having trouble accessing JSON data from a controller. (I'm using
> cake version 1.2
You can skip the App::import step completely. Your models are already
associated, so $this->Product is already accessible. In fact,
App::import doesn't do anything, it works like require_once(), you
would still have to manually instantiate the imported model class
yourself (i.e. App::impor
Hi there,
I'm having trouble accessing JSON data from a controller. (I'm using
cake version 1.2). My JSON request is as follows:
$.getJSON(
'/locations/find',
{s1:val1, s2:val2},
function callback(data){
//doStuff
});
I know that the JSON request is made just fine because when I tried it
wit
in your controller you can use
$this->Auth->user('id') or $this->session->read('Auth.User.id')
or in your view
$session->read('Auth.User.id')
---
Brett Wilton
http://wiltonsoftware.com
On Sat, Sep 20, 2008 at 3:51 AM, gabriel <[EMAIL PROTECTED]> wrote:
>
> Hi, sorry..found the solution to
Yes, you are right about that introduction; that section seems to be
out of date when compared to the API:
http://api.cakephp.org/cookie_8php-source.html
I have now submitted an update for that section of the Book so that
others will not be so confused. Hopefully it will appear soon once it
has
Hi everybody,
I have 4 tables and I want to create a custom query this is my correct
sql line
SELECT COUNT(*) AS "count" FROM "groups_permissions" AS
"GroupPermission" LEFT JOIN "groups" AS "Group" ON
("GroupPermission"."group_id" = "Group"."id") LEFT JOIN "permissions"
AS "Permi
Usually I create lists for using with $form->select(), vía
find('list') method. For instance, in the controller method
$l = $this->ProductCategory->find('list');
Another way to create the list is by using a plain query:
$l = $this->ProductCategory->query('SELECT `id`, `name` FROM
product_catego
http://book.cakephp.org/view/75/Saving-Your-Data#counterCache-Cache-your-count-490
book.cakephp.org search feature is useless. There is whole chapter
about "counterCache" but no search results ?!
On Sep 21, 6:41 pm, ORCC <[EMAIL PROTECTED]> wrote:
> I have a Manufacturer model having many Produc
It is a php syntax issue. When you declare a class attribute, its
value must be constant, i.e
class Foo {
var $foo = Array('equalTo' => 'xx', 'name' => yy); //correct,
since all array's elements are constant
var $bar = Array('equalTo' => Conf::read('Secret')); //Error,
since the value
Hi,
exists a better way for populating DataGrid in Flex application from
CakePHP (with CakeAMF) as this example:
[Bindable]
public var dgItems:ArrayCollection = new ArrayCollection();
for (var i:int=0; i < result.Users.length; i++)
{
dgItems.addItem(result.Users[i].User);
}
this solutio
The main one that got down to some of the useful details was this one.
http://ciobriefings.com/Publications/WhitePapers/DesigningtheStarSchemaDatabase/tabid/101/Default.aspx
highly recommended reading.
When I finally get my stuff together and have a nice re-usable package
i'll probably post a wri
Dear all,
I'm using CakePHP Email component, when i sent email and i set smtp_errors;
$this->set('smtp-errors', $this->Email->smtpError);
the variable *smtp-errors* return : *220-We do not authorize the use of this
system to transport unsolicited, *and my email did'not sent.*
*how to solved th
I have reading about vertical database (column-store) on google last night.
it seem interesting method.
Is anybody using vertical database with CakePHP?
Is vertical database good for designing some application using cakePHP?
if someone has vertical database using cakePHP, please let me know..
Th
I have a Manufacturer model having many Products. In order to return
the number of Products of a Manufacturer I wrote the following method
in Manufacturer:
function countProducts() {
App::import('Model','Product');
$condition = Array('manufacturer_id' => $this->id)
return $this->Product
Quick question,
In my model file, I'm using somethings like:
'rule' => array( 'equalTo', "secret phrase" ), 'required' => true //
hard-code value into file
Instead of:
'rule' => array( 'equalTo', Configure::read('forms.secretPhrase') ),
'required' => true
For some reason this results in a syn
On 21 Sep., 13:18, Eur <[EMAIL PROTECTED]> wrote:
> Hi guys!
>
> I'm new to cakePHP, but from what I've seen, I'm loving it. I like the
> ease of use that the conventions offer me, and just went through the
> blog tutorial. I now want to advance to the "Simple ACL" tutorial, but
> I can't ge
got that... Need to set soem field as invalid using Model::invalidate so
that the save aborts..
By I have another query now.. How do i fetch records saved to DB after
saveAll.
Thanks.
On Sun, Sep 21, 2008 at 8:23 PM, Novice Programmer <[EMAIL PROTECTED]
> wrote:
> Hello guys,
>
> in some cases
thanks, it also worked for, but probably it's worth noting, that these
declarations should be before usual CakePHP rewrites, so it should be
like this (at least I think so, the other way around didnt work for
me)
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com$ [NC]
Rew
Then there are bind/unbind model plus the new containable behavior to let u
select the columns in the query..
thanks.
On Sun, Sep 21, 2008 at 8:03 PM, Zac Tolley <[EMAIL PROTECTED]> wrote:
>
> Not only can u cache but In the find function use can set how deep the
> result goes and I find this ac
Hello guys,
in some cases i want to abort saving in beforeValidate callback. I have
returned false in that case, but i am not able to abort saving, it still
continues to save the record. Any ideas on what it can be?
--
Thanks & Regards,
Novice.
--~--~-~--~~~---~--~--
Hi guys!
I'm new to cakePHP, but from what I've seen, I'm loving it. I like the
ease of use that the conventions offer me, and just went through the
blog tutorial. I now want to advance to the "Simple ACL" tutorial, but
I can't get the CLI to work properly.
PHP on the command line is no problem
Thanks for replying to my slightly disorganised post. :)
I'll take a look at your article and see if it will show me the right
way forward for my situation.
>From a quick peak at the sql it looks promising.
/Martin
On Sep 21, 1:24 am, Joe <[EMAIL PROTECTED]> wrote:
> I brought this up to anoth
Not only can u cache but In the find function use can set how deep the
result goes and I find this actually results in ability to have fine
tuned lean db access
Sent from my iPhone
On 21 Sep 2008, at 07:35, toby78 <[EMAIL PROTECTED]> wrote:
>
> I am currently evaluating different frameworks
I tried that technique but it did not work. It appears that you can't
have multiple "useDBConfig"s in a single query. This seems reasonable
since you also can't do a raw select using multiple connections which
is what the useDBConfigs give you (I think).
Richard
On Sep 20, 5:56 pm, Adam Royl
I have looked for a CakePHP example that allows to add items using a
text input field that will be added in a list without reloading the
page.
E.g:
+ item 1 [remove]
- text input field -
when you add "item 2"
+ item 1 [remove]
+ item 2 [remove]
___
hi Matt,
> What does $this-> do? Is there a specific meaning to $this and to the
> "->" symbol?
http://www.devarticles.com/c/a/PHP/Object-Oriented-Programming-in-PHP/
jb
--
jon bennett
w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett
--~--~-~--~~
Under WAMP XP, "Production install"
c:\domains\cake_1_2
app
webroot
cake
docs
vendors
Defined alias "c:\domains\cake_1_2\app\webroot" to be http://localhost/cakeblog
URL http://localhost/cakeblog is good.. Happy front page, happy
database etc.
PROBLEM
URL http://localhost/cakeblog/
I'm new to cake and still learning the boundaries. However, I am
writing a CMS type system that will have the same components across
several CakePHP websites at different domains on our server. I have
the core cake lib on the server so all sites share the same core. And
I'm using RC2.
The end
I've been searching for a long time now...but I'm not seeing anything
that's really explicit on how I can handle this.
I've built a functioning CakePHP application. We've recently made the
decision to use Wordpress as our CMS. So, we have a functioning
CakePHP app (which is a pretty self contai
I am currently evaluating different frameworks and also looking at
cakePHP.
My first thought was that it seems not very efficient...
If you have an object, e.g. "User" that has other related objects such
as "Message" or "Photo" - there will be SQL statements to select all
content from all relate
Guys, I'm new to CakePHP and although I've dabbled in PHP, it was a
few years ago. So, I have a very basic question:
What does $this-> do? Is there a specific meaning to $this and to the
"->" symbol?
Actually, on a related note- anyone know how to find something like
"$this" on a web search?
Hrmmm...I'm a first time poster here...thought this was already
posted, but I don't see it now. Hope I'm not duplicating :-) Anyway,
I'll make it shorter this time.
I want to embed a CakePHP app into a Wordpress CMS (small site). I
want to share wordpress's session vars, css, js, etc. in the C
I am posting this here because for some reason the Cakephp site won't
let me submit a comment (even though I am logged in; it says there is
a problem but shows no more info.) So without further ado here is the
situation maybe someone can assist me with. I am currently playing
around with the Agg
41 matches
Mail list logo