Cakephp is a framework. Frameworks helps in rapid development of the
applications, structure the code better and help building more robust.
So as you might have guessed, cakephp has nothing to do with generating
random questions on fly or any thing like that.. :P... Its a pure
programming act and
First of all, I apologise if this is the incorrect forum to post my
query in.
I am currently writing an application, for an intranet/extranet
solution.
The PHP is currently in procedural, and I’d like to know if, and how,
I’d benefit if I moved the application onto the CakePHP framework.
Since
Thanks a lot buddy,
Your reply enforced my confidence... as for as limesurvey is
concerned...it is an excellent application but has several limitations
(I have got inspiration from this only)...my confusion with cakePHP
was its capability to generate random order for questions on the fly.
Now, s
Brian and delocalizer
I made the changes to the User model as you suggested but it made no
difference to the dubug. The ChildComment and User tables are still
not associated when I retrieve the comment data.
I think the missing link is I need to somehow define a belongsTo link
from the ChildCo
I dont think so, because saveField requires the ID, and I dont wanna
use the ID field in the clause WHERE
=/
I dont know what I do
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this gro
Guys,
I'm working in a project where many URLs can be entered for a blog. Let's
say Blog hasMany Blogurls; and I would like to show the well known "add
more" link to the form so user can add new URL fields when all are filled.
As far as I know, this code:
echo $form->input('Blogurl.url.1', array
echo $javascript->codeBlock('...', array('inline' => false));
On Fri, Aug 28, 2009 at 12:18 PM, Alessio wrote:
>
> the problem is that it put the code in the middle of page...
> This can be a suggestion for next release?
> 1-> to allow to helper JS to insert not only js page... (for example
> wit
Hi,
did I understand right, that the updateAll works but you just don't
like the two statements to get the result?
I guess that's the standard way cake does the updateAll, maybe because
of scalability.
But do you really need updateAll? Your query looks more like saveField
() is what you need.
Sry:
query('UPDATE Account SET memb__pwd=' . '"qweqwe"' . ' WHERE
memb___id=' . '"mylogin"')
--~--~-~--~~~---~--~~
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
Well if its technically not a component, you should package it as a
class and place it as a vendor.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@google
You shouldn't worry about it. IN statements are slower than OR and
Cake uses them constantly. If you really want to optimize your app,
optimize your controller and model logic, not the database queries.
--~--~-~--~~~---~--~~
You received this message because you are
I've done this:
Account->updateAll(
array('Account.memb__pwd' => "'qweqwe'"),
array('Account.memb___id' => 'mylogin')
);
?>
work, but not as I wanted... first cake does a select, later does the
update with the result of the select. look
11 SELECT [
Eh not so much. If you have a friends list it should be paginated and
even then it would be limited, so the query count wouldnt get to
high.
I currently run many sites with these features and its all fine.
--~--~-~--~~~---~--~~
You received this message because you
I fixed my syntax,
$conditions = array('or' => array( 'Userpage.approved' => 1, 'User.id'
=> $id) );
$order = array('User.id ASC', 'Userpage.id DESC');
$array = $this->User->find('all', array('fields'=>array('id',
'Userpage.id', 'User.animal_id', 'Animal.frontfilename'),
'conditions'=>$conditions
Hey folks,
I've been away from cakePHP lately, but finally I've stopped reinventing the
wheel and just went back to cakePHP. Let me say I am proud of it and I love
it again!
Since I was gone, cake's improved and I definitely like it.
Anyway, I've came up with a problem which obviously should be s
Based on my own experience using medium-sized tables the "or solution" is
slower than "replicating data solution"
Just my 2 cents.
Regards,
Pablo Viojo
pvi...@gmail.com
http://pviojo.net
¿Que necesitas?
http://needish.com
On Fri, Aug 28, 2009 at 2:35 AM, Miles J wrote:
>
> Your calling a few
Looks like you very nearly had it. Just got your find syntax slightly
wrong, try:
$array = $this->User->find('all', array(
'fields'=>array('id, 'Userpage.id', 'User.animal_id',
'Animal.frontfilename'),
'conditions'=>$conditions,
'order'=>$order
);
Then go have a look at the cookbook and s
Well, I can't replicate the error, but it was only selecting data from one
table which was surely the case.
Thank you for reminding about counterCache, I used to love it!
Cheers,
Faifas
On Fri, Aug 28, 2009 at 19:53, WebbedIT wrote:
>
> What SQL and error is it generating? Why not run the fi
What SQL and error is it generating? Why not run the find on the
CarTemplateCategory model with CarTemplate.id as a condition or better
still use counterCache automagic to save yourself time and resources.
http://book.cakephp.org/view/816/counterCache-Cache-your-count
--~--~-~--~~---
In this case it's the same model that being paginated multiple times.
Can you explain 'have some vars that take other values'? Or maybe a
short example?
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakeP
Try the following code for your ajax form. Note the update to
'comments' from 'comment'::
form(null,'post',array(
'update'=>'comments',
'url'=>array(
'controller'=>'comments',
'action'=>'add'
)
)
);
echo $form->i
You can put something like this in your view:
echo $html->css('the_filename_without_extension', 'stylesheet',
array('media'=>'screen'), false);
http://api.cakephp.org/class/html-helper#method-HtmlHelpercss
On Fri, Aug 28, 2009 at 8:44 AM, ruchika batra wrote:
> hi
> I am a beginner.i want to ad
Hi,
If you want to include extra.css to your view, add this code to your view
file:
css('extra',null,null,false); ?>
In your layout, make sure that there's this line somewhere between the
tags (already included in the default layout):
Read the CakePHP book for more info:
http://book.cakep
the problem is that it put the code in the middle of page...
This can be a suggestion for next release?
1-> to allow to helper JS to insert not only js page... (for example
with ctp it can trasformed in to code coming from php)
The scope is to put code js mixed with php , and put them into the
he
Hi guys!!!
Could someone help me here please, this is urgent!!!
I getting crazy with this method. Look what I'm doing:
Account->updateAll(
array('Account.memb__pwd' => 'qweqwe'),
array('Account.memb___id' => 'mylogin')
);
?>
and I'm getting this:
11
I think the problem is not so much the value of the labels' "for"
attribute (NOT the id, which it doesn't have) but the id of the radio
elements. There are several groups of these, so there are several
radio buttons with the same id.
On Thu, Aug 27, 2009 at 10:25 PM, delocalizer wrote:
>
> Do you
$conditions = array('or' => array(
'Userpage.approved' => 1,
'User.id' => $id
)
);
$order = array('User.id ASC', 'Userpage.id DESC');
$array = $this->User->find($conditions, array('id, 'Userpage.id',
'User.animal_id', 'Animal.frontfilename'), $order);
I get the following errors:
Hello, in my test writing it appears I'm running into the exact same
problem as reported in bug #6135 (https://trac.cakephp.org/ticket/
6135, Unable to load record fixtures from MS SQL) but with
Postgresql. I can't seem to open a new ticket though, I get "403
Forbidden (TICKET_CREATE privileges a
Hey all,
I'm being given no small amount of grief in installing a working
CakePHP app into a subdirectory on my campus' shared server. It must
be installed in the directory /~forans, at the very least, meaning my
index file will appear in /~forans/app/webroot/index.php
However, I get a 404 when
Hi,
Not noticed this until now as it's the first time I have created an
inline link with a character immediately after the link.
For example:
[code]Here is some text link('link followed by a
comma', '#'); ?>, then some more text.[/code]
The html output for this will be:
[code]Here is some tex
Hi,
I have setup my pages to be encoded using utf-8, it works on all my
pages: extended characters are rendered without pbm (é,à,ö ...)
however I have bits and pieces rendered as Ajax elements; The content
of those elements does not seem to pickup the utf-8 encoding,
resulting in charcters such a
Hi,
Not noticed this until now as it's the first time I have created an
inline link with a character immediately after the link.
For example:
Here is some text link('link followed by a
comma', '#'); ?>, then some more text.
The html output for this will be:
Here is some text link followed by
I think the model was definitely the right, maybe the only place for
it, where I wouldn't have to repeat it. Thanks!
On Aug 27, 12:28 pm, Melgior wrote:
> Most people seem to be fan of 'fat' models: put all your code that
> handles data in your models and keep your controllers thin and easy to
I'm currently looking to use ezComponent's ezcGraph library within a
CakePHP project, but I've noticed ezComponents specify a requirement
to have their base library loaded. (Is this similar to Zend now? Last
I knew Zend didn't require a loader to use it as a Vendor.)
Rather than rushing in head
I have just had a very quick look at this, but it seems the error is
because you are passing a string without wrapping it in single quotes
so the UPDATE statement is looking for a column instead of a string.
Try:
Account->updateAll(
array('Account.memb__pwd' => '\'qweqwe\''),
Hi Guys,
i just discovered a small bug in the latest cake php email component
class when using SMTP delivery and server does not need any
authentification to be send.
The email component checks the authentification method by sending
"AUTH LOGIN"
to the server and checks the response code for a v
Does this same code snippet apply when the code is in the model too?
I'm trying for fat models and skinny controllers.
Thanks in advance.
On Aug 27, 6:00 am, "rich...@home" wrote:
> Just to clarify mike's point:
>
> in your controller:
>
> $conditions = array("Property.zip" => $this->data);
>
>
$this->element(...)?
http://api.cakephp.org/class/view#method-Viewelement
On Fri, Aug 28, 2009 at 4:44 AM, Alessio wrote:
>
> I need link a file ctp with javascript and php inside...
> What can I do?
> If i link a ctp, the helper adds the extension js...
> I want to render a ctp file, if I rende
- What I need to do now is to fetch all the properties which are
inside a certain area id.
Property belongsTo Area. That is, the properties table should have an
area_id column.
On Fri, Aug 28, 2009 at 7:02 AM, Bryan Paddock wrote:
> Hey all,
> I'm trying to execute a query including a table whic
Hi,
yes, you are on right track... this is how you should do it
$audios = $this->Audioplaylist->Audio->find('all',
array('conditions' => array('Audio.id' => $audioIds) )
);
This will translate to Audio.id IN (1, 2, 3)
Your problem might be because of your array.
Make sure your array $audi
hiI am a beginner.i want to add css to the individual view i have
created.please help me how to do that.thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send e
Hi,
On Aug 27, 10:27 pm, Braindead wrote:
> In my opinion using a model for breadcrumbs is bloated. Why don't you
> just set the breadcrumbs in the view manually? The HTML helper has two
> functions addCrumb and getCrumbs, which makes basic breadcrumbs really
> simple.
Well, I am using a "menus
Hi,
thx for the answers!
I just found the problem, the array is ok as is the find, the problem
is caused by one of my behaviors where I the condition is influenced.
Funny that just yesterday something similar happened to one guy on irc
channel I tried to help with non working pagination.
Never
Hi Guys,
I think I got interesting question for you all.
I have to paginate this query and since I am using paginate in this
controller in several actions I can't even override paginate method in
my model class.
I have to achieve this using bindModel kinda methods.
Simple Many-to-Many relation
Afaik you can store arrays into sessions.
The documentation says it's type String for Session->write() , but
specifies 'mixed' for Session->read() , so I'm guessing it's a
documentation glitch.
Only one way to find out ... test it :)
On Fri, Aug 28, 2009 at 11:30 AM, persianshadow wrote:
>
> hi
Do you have debug turned on? Look in cake/app/config/core.php file.
Rick
On Aug 28, 6:11 am, Xanax wrote:
> Hi,
>
> I've got some problems with my cakephp app : i have this message when
> i launch it :
>
> Fatal error: Maximum execution time of 30 seconds exceeded in C:
> \Program Files\EasyP
i am working on a plugin based application. For one of my model i do
not need to use table. So i use $useTable=false on the model and also
add $uses = array() on the controller. But it does not work. I have
rechecked model , controller names. Any help is appreciated.
Thank you.
--~--~-~-
Hello DeFranco, the link is this:
http://groups.google.it/group/cake-php/browse_thread/thread/405946857d2f8ed3/8dbac8722596a58b#8dbac8722596a58b
thanks a lot
fabio
Defranco wrote:
>
>
> Hi Fabio,
>
> I've tried your link, but it is invalid.
>
> Could you please try to posting it aga
Hi DeFranco, i'm a CakePHP newbie and i'm handling on a quite similar topic
for
which i've opened a specific thread here:
http://groups.google.it/group/cake-php/browse_thread/thread/405946857...
Could you maybe have a quick look on it a give me some little suggestion ?
thanks a lot in advanc
The example sql you entered will not work. There must be _some_
relationship between the area table and the location table or you
cannot do a query!
Is the location geometry point contained within the area polygon? Is
this expressable mathmatically?
Rick
On Aug 28, 7:02 am, Bryan Paddock w
I have used array assignment before and it works perfectly :
// General conditions for the query
$conditions = array( 'Institute.conversions' => 'yes',
'Institute.brochure_pay_amount >' => 0,
'Training.id' => $highestRatedTrainingI
Hi Fabio,
I've tried your link, but it is invalid.
Could you please try to posting it again?
thanks
On 28 ago, 08:51, fabiox <3bi...@gmail.com> wrote:
> Hi DeFranco, i'm a CakePHP newbie and i'm handling on a quite similar topic
> for
> which i've opened a specific thread
> here:http://groups
Hey all,
I'm trying to execute a query including a table which is not related. I'm
not sure how I can go about doing this...
3 models in question:
property (which has a location_id field)
location (which has a location_point field stored as geometry point)
area (which has an area_box field stored
If you really need to do that you may be able to accomplish it by providing
the file download inside an iframe and then redirecting the main window...
I haven't tried this... it's just an idea...
On Fri, Aug 28, 2009 at 3:15 AM, brian wrote:
>
> You can't. In order to have the browser present th
Hi,
I've got some problems with my cakephp app : i have this message when
i launch it :
Fatal error: Maximum execution time of 30 seconds exceeded in C:
\Program Files\EasyPHP 3.0\www\cake_1_2\cake\libs\model\datasources\dbo
\dbo_oracle.php on line 357
I would like to know how it's possible to
Thanks a lot !
On 28 août, 06:52, "Dr. Loboto" wrote:
> class MyModel extends AppModel {
> $this->name = 'MyModel';
> $this->alias = 'MyPreferredAlias';
> $this->useTable = 'my_actual_table_name';
>
> }
>
> On Aug 27, 11:13 pm, Xanax wrote:
>
> > Hi,
>
> > I need to change the alias
hi
i want store array of ids into session but i explore API of cakephp
and see $value ( Session->write($name,$value) )
only get string , i need it for store id of items that user select .
anybody have idea for do this ?
thanks
--~--~-~--~~~---~--~~
You recei
If your really want to secure that kind of stuff, you could add an extra
hidden field with an encrypted version of the article ID:
hidden('postIdKey',array('value'=>sha1(Configure::read('Security.salt').$post['Post']['id'])))?>
and then after submission check if this key is correct:
if ($data[
I need link a file ctp with javascript and php inside...
What can I do?
If i link a ctp, the helper adds the extension js...
I want to render a ctp file, if I render It put in the same point
where I link.
I want to put inside the head section.
How Can I do this ?
--~--~-~--~~--
As a last resort, you could always use PHP's serialize and unserialize
functions to convert the array into a string and back. I think there
must be a better way to do it, but I've got no ideas about how
currently. If you're building a busy site, then using serialize is
performance wise not the bes
It depends on table size. If you have many users and many friends
relations between them it matters. When you test on 10 users such
query is immediate of course.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePH
hi Melgior
my website have heavy process and i searching for fast solution
that store and read array .
On Aug 28, 12:02 pm, Melgior wrote:
> As a last resort, you could always use PHP's serialize and unserialize
> functions to convert the array into a string and back. I think there
> must be a
Hello all ! !
I'm usign the following Router to make my site multilanguage
Router('/:language/:controller/:action/); And it work fine for create
to me the links as I need them.
ie : http://www.mydomain.com/gre/users/index
witch gre is for greek language.
Now the question is how to create a ne
src and same attributes should be set by $html->url('/path/to/your/
somefilename.swf').
On Aug 28, 1:45 pm, Matias_castro wrote:
> Does anyone know hoy to embed a flash animation (.swf) into a layout??
> I can't get html "object" to work. I'm trying to use this code:
>
>
>
>
>
>
>
> Please
Hi, i'm a CakePHP newbie and i'm handling on a quite similar topic for
which i've opened a specific thread here:
http://groups.google.it/group/cake-php/browse_thread/thread/405946857d2f8ed3/8dbac8722596a58b
Could you maybe have a look on it a give me some little help ?
thanks a lot in advance for
Thanks again Dr.Loboto,
that's what i came up to as well, but it works only for the last
checkbox of the list (or the first if i used 'before' parameter)...
what i need is a text field associated for each checkbox of a group of
checkboxes... don't know if it's possible at this point... :-(
damn
Hi,
I have an array with some ids of a model and struggle with getting
them into a find condition.
This is what I currently use, it works but is not very caky:
$audioIds = array('1', '2', '3',);
$audios = $this->Audioplaylist->Audio->find('all', array('conditions'
=> 'Audio.id='.implode(' O
Hi,
This is haw I paginate and it works OK,
I have 3 join tables ( I can set different type of joins ),
Did you understand what is happening ?
function MyFunctionThatReturnPaginateArrayInfo {
code code code
...
return array(
'MortgageDetail' => array(
Check if you call the right model for pagination, or you can have some
vars that takes other values.
On Thu, Aug 27, 2009 at 10:36 PM, ML wrote:
>
> Does anyone know how to have multiple blocks (multiple tables for
> example) of paginated data on the same page? There seems to be 2
> issues:
>
> 1
Just grab the id from the actions ID argument.
--~--~-~--~~~---~--~~
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 email
Read manual.
http://book.cakephp.org/view/191/options-before-options-between-options-separator-a
echo $form->input(
'Amenity',
array(
'type' => 'select',
'multiple' => 'checkbox',
'after' => $form->input(
'User.name',
array('onfocus' => 'Ch
If you can do view for your union query you will be able to work with
it as with normal table.
On Aug 28, 5:58 am, Dean C wrote:
> Hi folks,
>
> Before I begin, yes I've read this
> page:http://book.cakephp.org/view/249/Custom-Query-Pagination
>
> I've also read many of the other pages on Googl
Dear Dr.Loboto, thank you very much for your suggestion... i'm
handling on it but i would first need to know how to set the
FormHelper options to show one text field beside each checkbox...
I was thinking about something like markup injections using
parameters "between[string]" or "after[string]
yes, we work with cake for a medium to big size app, and it is OK.
"CakePHP is a rapid development framework for PHP that provides an
extensible architecture for developing, maintaining, and deploying
applications. Using commonly known design patterns like MVC and ORM
within the convention over c
Hi Vijay;
you could certainly develop something like what you suggest in
cakePHP. But check out limesurvey (http://www.limesurvey.org/) -
probably it could do what you want straight out of the box and save
you a lot of time...
On Aug 28, 3:29 pm, Vijay Pandey wrote:
> Hi !
>
> I am new to cakeph
Export from Flash a html page with Flash in it, then paste your code
in other page.
Hope this helps you,
Chears
On Fri, Aug 28, 2009 at 9:45 AM, Matias_castro wrote:
>
> Does anyone know hoy to embed a flash animation (.swf) into a layout??
> I can't get html "object" to work. I'm trying to use
1. If friends system is not mutual 2 records are needed.
2. Even for mutual system "OR" in query is more expensive then 3-int
row in DB.
On Aug 28, 9:45 am, Miles J wrote:
> @DigitalDude - Yes thats correct.
>
> @Pablo - No its not, it doesn't make a difference in overhead at all.
> Also by inse
Right :), my bad English.
I red the change logs, I will try to talk to him and get some
arguments for his decisions.
Thanks
c05min.
On Fri, Aug 28, 2009 at 3:30 AM, Alexandru Ciobanu wrote:
>
> On 8/26/2009 1:27 PM, Cosmin Paul wrote:
>> Hi,
>>
>> I am a programmer from a 7 gays team, and I hav
class MyModel extends AppModel {
$this->name = 'MyModel';
$this->alias = 'MyPreferredAlias';
$this->useTable = 'my_actual_table_name';
}
On Aug 27, 11:13 pm, Xanax wrote:
> Hi,
>
> I need to change the alias OR the name of a table.
>
> It's weird, i tried to change many variable whit
Hi,
I created a CakePHP project to my domains subfolder (www.domain.com/
demo) and my root .htaccess-file looked like this:
RewriteBase /demo
RewriteEngine on
RewriteRule^$ app/webroot/[L]
RewriteRule(.*) app/webroot/$1 [L]
Everything was working and I understood what
Your calling a few OR queries on a page, its not going to cause any
slow performance.
--~--~-~--~~~---~--~~
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
81 matches
Mail list logo