That is the wrong way.
You should use $Model = ClassRegistry::init('ModelName);
On Nov 30, 11:07 pm, brassman79 wrote:
> so I figured out that I can access a model to save and retrieve data
> from components by saying $myvar = new ModelName();
>
> etc.
>
> I have another model that keeps giving
p.s. I am using elements here but you can just use php's require() or
include()
On Dec 6, 4:17 am, "j0n4s.h4rtm...@googlemail.com"
wrote:
> You do not even have to use elements. Just call the views from your
> action to enable all the $this->set() calls, and include the views via
> $this->element
You do not even have to use elements. Just call the views from your
action to enable all the $this->set() calls, and include the views via
$this->element('../controllername/viewname.ctp'), you could also use.
This is how I do it, in my example I show registration and login view
next to each other:
try to place the order in the outside array parts like this
http://github.com/ionas/sna/blob/master/www/app/controllers/messages_controller.php#L66
($just imagen $this->paginate to be your second find() param.)
On Dec 5, 11:33 pm, Marcelo Andrade wrote:
> Hi there,
>
> I'm using containable to ge
I recently had some memory leak issues with my site. Php wasn't
releasing Simplepie's feed.
Through the process of debugging, I started thinking about the memory
consumption of my site. Which brought up a couple of questions.
1. On my dev system, the default baked app uses around 9MB; on my site
Ok, I found out something. It was the line where I was putting out
"Stuff". When I commented out that line things were
better. I had just forgotten that was supposed to be a fieldset
"Stuff".
Then I discovered having a /div inside a fieldset ends the fieldset,
so that was weird too. Something
Ok, I found out something. It was the line where I was putting out
"Stuff". When I commented out that line things were
better. I had just forgotten that was supposed to be a fieldset
"Stuff".
Then I discovered having a /div inside a fieldset ends the fieldset,
so that was weird too. Something
Well, I can think of a few ways to achieve the desired result you're
looking for. First of all, you should be doing that 'last_job' key
creation in your Project model's afterFind($results) callback if
you're going to go down the array manipulation route.
In regards to pagination, you could do it
Thanks for your answer! But it doesn't works...
I tried with:
$paginator->options (array ('url' => $this->passedArgs));
and
$paginator->options (array ('url' => array_merge ($this-
>passedArgs)));
$this->passedArgs contains my article_history_id (56)
but in both cases, for the 2nd page, the url l
Thanks for your answer, but that wasmt working.
I found the solution:
paginator->options ( 'url' => array ($this->passedArgs, '?' => 'for='.
$toSearch));
... if you want url's with anchor, then use:
paginator->options ( 'url' => array ($this->passedArgs, '?' => 'for='.
$toSearch, '#' => 'anchor_
Hi there,
I'm using containable to get a set of records like this:
$this->Pagamento->contain(array(
'Lancamento'=> array(
'fields'=> array('mes_ano')
, 'Unidade'=> array(
'fields'=> array('quadra_id', 'lote')
This formatting happens in a helper and I return the $out variable and
echo it.
foreach ($this->data['Resumeitem'] as $ri)
{
#debug(Sanitize::html($res->formatSection($ri, $count)));
echo $res->formatSection($ri,$count);
echo "\n\n";
Hello,
> I have another model that keeps giving me this error.
>
> Fatal error: Class 'StatisticsUser' not found in ...
>
> the problem that I think I'm having is that this is the "join" table
> for users and statistics.
>
> how do I write to this table properly thru cake?
So do you have that cla
Hello,
> i would like to have solution that fully independent. so i think
> modify rewriterules is the best.
> so far i did not find any rewrite rule that work for this situation.
What kind of server is that? Or maybe you already figured it out yourself?
Regards,
Piotr
Check out the new CakePH
Perhaps you could post the php inside your template so we could see
it? Also are you sanitizing your email addresses as perhaps there is
extra characters being captured that you are giving to your view?
Mike Karthauser
Brightstorm limited
Tel: 07939252144
On 5 Dec 2009, at 12:22, Mauro Ribeir
Hello,
> Which 'seems' to be working, altho the 'laptime' value is in a [0] key
> outside of the [Lap] array.
>
> Is this to be expected or am I doing something wrong?
Unfortunatelly this is how it works, aggregate fields will have a numeric key.
Maybe this can be changed with some SQL alias hac
Hello,
> You can see, that the self join relation could not be dissolved. So, I
> could not display the name of the precursor as I want. Where is my
> mistake.
How about setting $this->Project->recursive to a higher value?
Regards,
Piotr
Check out the new CakePHP Questions site http://cakeqs.or
Hello,
>> I need to convert the following:
>>
>> SELECT *
>> FROM `laps`
>> WHERE `id` = (
>> SELECT `id`
>> FROM `laps` AS `alt`
>> WHERE `alt`.`user_id` = `laps`.`user_id`
>> ORDER BY `lap_time` ASC
>> LIMIT 1 )
>> ORDER BY `lap_time` ASC
>> LIMIT 10
Really? :)
OK, sth like that:
$this->Lap->
Hello,
Since nobody answered you yet, l'll try to answer your question...
> I'd like to find out if anyone can point me either to an online
> article or describe whether it is possible to setup CakePHP to use
> different database connections for different MySQL actions.
>
> eg one connection for
What control panel? CakePHP has no "control panel." If you are
thinking CakePHP is something like Front Page, that is not how it is
at all. The CakePHP interface is an API (Application Programing
Interface) and you need to write PHP code to use it. Do you know
anything about programming in PHP? You
Hello,
> What should I do?
If you really want to have your CakePHP app at http://localhost/,
adjust the Apache DocumentRoot to c:/wamp/www/cake_1.2.5/app/webroot/
(restart Apache afterwards).
The better way, however, is to create a virtualhost for each of your
cakeapp, for example http://app1.lo
Hello,
> I am trying to put a site on a shared host. after copying the code on
> the server and editing the htaccess files the default cake page says
> everything is ok.
>
> but as soon as i try to access my controllers i get
>
>
> Fatal error: Cannot access empty property in public_html/cake/libs
Hello,
> I have decided to create my new website with CakePHP.
>
> This experience is already stopped. when I open the page
> http://localhost/cakephp/
>
> I have put the cakephp files in C:\xampp\htdocs\CakePHP
Seems like you have put it in htdocs...
What's the exact (absolute) path to app/webr
Hi all,
I have decided to create my new website with CakePHP.
This experience is already stopped. when I open the page
http://localhost/cakephp/
I have the following message:
Error: CakephpController could not be found.
Error: Create the class CakephpController below in file: app
\controllers
hi,
I am trying to put a site on a shared host. after copying the code on
the server and editing the htaccess files the default cake page says
everything is ok.
but as soon as i try to access my controllers i get
Fatal error: Cannot access empty property in public_html/cake/libs/
controller/com
Vote Midamerica
Chicago, St. Louis, Kansas City or maybe Nashville
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, s
Thanks Jeremy,
Having done further digging since I posted, I have found that the
problem regarding my httpd.conf setup which was NOT properly loading
mod_rewrite.so. The book didn't mention this requisite. :(
The file configuration I had setup works fine as well as does the one
you sugges
Cakephp core thinks about any table in same way. So if table consists
of several words then system sigularize just last one.
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to th
Hi
I'm following this tutorial (in particular Part 4):
http://www.ibm.com/developerworks/opensource/tutorials/os-php-cake4/section4.html
it uses a join table for a many-to-many relation between Users and
Products (representing favorite products of users):
CREATE TABLE products_users (
produ
Marcelo Andrade wrote:
> On Thu, Dec 3, 2009 at 7:42 AM, Lorenzo Bettini wrote:
>> is there a version of APIs and book documentation to be downloaded for
>> offline browsing?
>>
>> thanks in advance
>>Lorenzo
>
> http://groups.google.com/group/cake-php/browse_thread/thread/5f45c1d0779c716
ok - probably not the most efficient, but the following should work if
your relationships are setup in the models
$submissions = $this->Submission->find('all', array('fields' => array
('DISTINCT student_id'), 'recursive' => -1);
$student_ids =Set::extract($submissions, '/Submission/student_id');
/
that works:
$html->link('sth', array('controller' => 'Accounts', 'action' =>
'Manage', '?' => array('var1' => 'sth', 'var2' => 'sthelse')));
But that doesn't:
echo $form->create('Accounts', array('url' => array
('controller' => 'Accounts', 'action' => 'Manage', '?' => array('var1'
=> 'sth'
I'm running Wamp5. I installed Cakephp 1.2.5 to c:/wamp/www/cake_1.2.5
When I run the browser to http://localhost/cake_1.2.5/ everything runs
just fine, but http://localhost/ alone doesn't show anything related
to cakephp.
I have uncommented the line LoadModule rewrite_module modules/
mod_rewrite.
Hi there
I'm not fully awake yet, but it might be worth trying to think of
things "in reverse" so to speak (and not ideal, but maybe split into
two separate cake calls)
so rather than putting the find method on the data that you ultiamtely
want, put the find query on the model with the clause
Your directory structure doesn't look right. The directory 'cakephp'
is effectively the root of your site. The files/folders within it
should be:
.htaccess
/app
/cake
/docs (optional, but useful)
index.php
/vendors
All of the files and folders that you create go in the /app folder.
If you follow
Thanks for the tip. That isn't in the docs (although it is in the
API). Regrettably, that doesn't work either - it is clearing the
variables. However, I solved this issue now (very simply and
elegantly) and am in the process of writing up my solution, which I'll
post back here).
On Dec 4, 5:49 pm,
Hello,
I have downloaded CakePHP, Windows XP.
I am referencing the book "Beginning CakePHP" by David Golding.
I have Apache on my staging server, but it has many things there, so I
set up a cakephp package as follows:
/cakephp
cake
apps
todo
modules/item.php
con
Perhaps posting some code for us to look at?
Mike Karthauser
Brightstorm limited
Tel: 07939252144
On 5 Dec 2009, at 05:22, jagadeesh puthukkudi
wrote:
> In CakePHP 1.2 i am facing a new problem for drop down selection of
> state corresponding to country .I used ajax and cake1.2
>
> My code wo
I would like to know what you are doing with the $out variable later
on in the code, until it is printed out/sent to the layout/view. Can
you provide the code?
Enjoy,
John
On Dec 5, 12:42 am, Nancy wrote:
> This has me going nuts. I'm using 1.2.5 and I'm calling a helper that
> formats some h
Thanks Marcelo,
I do know you can define your way around it, but if you anyway are
designing the database, then by following the standards you will avoid
this task. Anands database design certainly was not near anykind that
I would have designed, which is why I suggested Anand to follow the
CakePH
40 matches
Mail list logo