have category.name and layout.name
instead of the id of the category.
I could build a MySQL query for this, but I wonder what's the CakePHP
way.
(The more ways, the marrier it is ;))
--
Adrian Godong
[EMAIL PROTECTED]
Microsoft Student Ambassador
I'm assuming that you don't want any 'User' added on the query?
-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Kynlem
Sent: 25 Desember 2006 5:24
To: Cake PHP
Subject: findBy issue
Hello,
I've been having some problems with a findByfield
@googlegroups.com
Subject: Re: findBy issue
2006/12/25, Adrian Godong [EMAIL PROTECTED]:
I'm assuming that you don't want any 'User' added on the query?
What do you mean?
The problem is that there is no value on the right side of the comparison operator in the where clause
Not that I know of, and can't think of anything easy to implement.
Unless you created a non-normal view where each Product row will have their
own Holiday fields (therefore, duplicating Holiday fields for every Product
row).
CMIIW, are you creating an array of Product for a specific Holiday
= '.
$this-Session-read('User.id'),
)
);
If this works, I could just read the $shop['User'] to check if the
current user can edit the Shop details. But it doesnt seem to work.
Any better way to get this working?
TIA
john
--
Adrian
I think it has something to do with the result parser. It's not a bug, it's
by design.
Other association that does join tables are belongsTo.
Why do you need it in one query?
-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of [EMAIL PROTECTED]
OK, so basically you have an array on top of everything. That's why you
can't debug($data['Product']); or loop it directly.
For this particular $data, to iterate through each product, you will need to
use:
Foreach ($data as $holiday) {
Foreach ($holiday['Prodcut'] as $product) {
[Write
?
I'm still interested in this problem. It seems something syntactically wrong
or I'm just dead reading code.
Could you supply us again with the output of debug($data); and how do you
plan on using it (i.e. the foreach block)?
The error should be there somewhere.
-Original Message-
Prof. Lessig has one of those great presentations about copyright vs.
Innovation. Try googling it up. I need to dig in several gigs of data to
find the link. :D
(usually, keyword Lessig does the job, it's in flash, BTW)
-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL
What're you trying to do?
Your array dump looks like only contains ONE Holiday with MANY Products
(which is TRUE, according to your definition earlier).
If you wanted to iterate through the products, you should use:
Foreach($data['Product'] as $product)
Not $data['Holiday'].
-Original
PROTECTED] wrote:
On 12/19/06, Adrian Godong [EMAIL PROTECTED] wrote:
Prof. Lessig has one of those great presentations about copyright vs.
Innovation. Try googling it up. I need to dig in several gigs of data to
find the link. :D
I think this is what you mean:
http://philosophytalk.org
Assumed that you do a findAll from the controller to variable named holiday.
You can access it from $holiday['Holiday']['Product'] array.
If you're not sure, you can try inserting
debug($holiday);
to see the structure of your variable.
-Original Message-
From:
The selectTag has a third (or fourth) parameter after the name/value arrays
parameter that accepts selected single name or array of names. Matching name
from name/value parameter and selected name parameter will have the selected
attribute on the generated HTML tag.
Let me know if you need more
To simplify your code, you can define var $displayField = 'name' in your
Model, and have everything generated by the generateList(); -- no params
necessary.
You will need to utilize Javascript on your second question.
On the first selectTag, add 'onChange' = 'javascript:changeSelect();' on
the
Well, the first param for the findAll is the SQL condition. CakePHP is not
smart enough (yet) to understand arrays of conditions, it just accepts a
string and place it after the WHERE clause in the SQL statement.
To answer your question, change the array into it's SQL language (i.e.
global=1 AND
No, you should put var $helpers (notice the 's') on your code. And keep the
'Javascript'.
On 12/7/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
try 'javascript' instead of 'Javascript'
--
Adrian Godong
[EMAIL PROTECTED]
Microsoft Student Ambassador
1. You have several different options. You can use requestAction to call
other controller/action and display the results in the current
view/controller. If you only need the view (not the logic from the
controller/action), you can move the view code to an element, and call the
renderElement
You're welcome.
Happened to me quite often in the past. :D
-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of ERic ZoU
Sent: 07 Desember 2006 19:29
To: Cake PHP
Subject: Re: Cant load prototype in my default.html .
Thanks Adrian. s
Big S
['pcsDuration'].',NOW());
mysql_query('SET NAMES gbk;');
$this-execute($sql);
$pid=$this-getLastInsertID();
...
problems is that $pid is empty .why?? thanks !!!
--
Adrian Godong
[EMAIL PROTECTED]
Microsoft Student Ambassador
--~--~-~--~~~---~--~~
You
?
--
Adrian Godong
[EMAIL PROTECTED]
Microsoft Student Ambassador
--~--~-~--~~~---~--~~
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
misunderstood you ?
+++
clemos
On 11/28/06, Adrian Godong [EMAIL PROTECTED] wrote:
Is the second solution feasible? I mean AFAIK, if you stick to the default
CakePHP implementation of HABTM, you can't have any other field other than
the two PK/FK fields.
Take a look at how CakePHP handles
Yes, components DO get loaded before CakePHP access beforeFilter. You might
haven't add the component to the controller $components variable.
On 11/28/06, Synchro [EMAIL PROTECTED] wrote:
Adrian Godong wrote:
Hi, I'm trying to implement some user authentication system, and need to
check
From database normality PoV, you should stick with your current structure
(approach 2). Complexity of SELECT query should belong to CakePHP engine,
not yours.
If you have defined the Model Association correctly, CakePHP will also
retrieve related tables, so you shouldn't worry about how to
/16/06, Adrian Godong [EMAIL PROTECTED] wrote:
What's the difference between element and helper? When should I use one
over
another?
Let me try and put it as simply as possibly
Element = snippet from a template which you just render in your
templates an example would be a dynamic menu which can
a component is like a helper for your controllers like many
controllers might want to send email, so you could have a email
component
Sam D
On 11/16/06, Adrian Godong [EMAIL PROTECTED] wrote:
OK, I got the big point.
But pls CMIIW: anything that a Helper can do, an Element can also do the
exact
Guys,
What's the difference between element and helper? When should I use one over
another?
Thanks!
--
Adrian Godong
[EMAIL PROTECTED]
Microsoft Student Ambassador
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Can you post the code? Mine's working well based on the tutorial.On 11/12/06, Eric [EMAIL PROTECTED] wrote:
Thanks Buddy...BUT, I just can create a rss by browser like
http://localhost/cake/posts/rssAnd I can add it for my FF2.0BUT it is contains nothing...Why?-- Adrian Godong[EMAIL PROTECTED
-outputFeed();to $rss-saveFeed();I have save the feed by my FF, and it appeard in my bookmarks Toolbar
folder. BUT, It contains nothingDon't know why...-- Adrian Godong[EMAIL PROTECTED]Microsoft Student Ambassador
--~--~-~--~~~---~--~~
You received this message
($hour,$min,$sec) = split(':', $hours);
$date = date(r, mktime($hour, $min, $sec, $month, $day,$year));$item-date = $date;$item-source = source;$item-author = author;
$rss-addItem($item);}$rss-saveFeed();?Thanks-- Adrian Godong[EMAIL PROTECTED]Microsoft Student Ambassador
still need
to tackle the debugging features.
Haven't really tried some unit testing integration.
On 11/9/06, Adrian Godong [EMAIL PROTECTED] wrote:
Hi,
I'm using Eclipse 3.2.0 + PHP plugin from Eclipse (not PHPEclipse)
Local workspace setup is just like your number 1. I will have one cake lib
.
Cheers,Sonic
-- Adrian Godong[EMAIL PROTECTED]Microsoft Student Ambassador
--~--~-~--~~~---~--~~
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
You should change the name of the 'association'. E.g.:
...
var $belongsTo = array(
'ParentCategory' =
array('className' = 'Category',
...
And
...
var $hasMany = array(
'ChildCategory' =
a function in
advance:(maybe i should learn more about basic php?-- Adrian Godong[EMAIL PROTECTED]Microsoft Student Ambassador
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group
You're not alone. I'm looking at the same problem.I think it's because the wiki documentation is outdated. The sample from bitfolge.de (the creator of feedreader) mentioned something called saveRss function.
Just tried, it works! Change the last line in your rss.thtml: $rss-outputFeed();to
More information about the error?
From: cake-php@googlegroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Gayathiri Balachandran
Sent: 31 Oktober 2006 13:43
To: cake-php@googlegroups.com
Subject: Cake PHP Help
Hello!
Please
help me in finding answer to this.
I
am new to Cake
35 matches
Mail list logo