Re: Simple SQL UPDATE question

2009-06-24 Thread Femi Taiwo
Hi You could imply use the Increment Behavior: http://bakery.cakephp.org/articles/view/increment-behavior Femi yodi wrote: Hello, maybe you can use updateAll : http://book.cakephp.org/view/75/Saving-Your-Data perhaps it's help. On Wed, 2009-06-24 at 00:35 -0700, Rangi wrote:

Re: Problem with Large Datasets

2009-06-16 Thread Femi Taiwo
x27;),         'order' => 'popularity, RAND()',     );         return $this->find('all', $query); } Hope that helps, Adam - Original Message -   From: Femi Taiwo   To: cake-php@googlegroups.com   Sent: Tuesday, June 16, 2009 8:32 PM   Subject: Re: Probl

Re: Problem with Large Datasets

2009-06-16 Thread Femi Taiwo
'conditions' => array('User.age >' => 22, 'User.age <' => 27) ) On Jun 16, 5:05 am, Femi Taiwo wrote: Hi all, I'm having a scalability problem, and urgently need to refactor. The project is just 2 months old and already has over 20

Re: Problem with Large Datasets

2009-06-16 Thread Femi Taiwo
- Original Message - From: Femi Taiwo To: Cake PHP Sent: Tuesday, June 16, 2009 7:05 PM Subject: Problem with Large Datasets Hi all, I'm having a scalability problem, and urgently need to refactor. The project is just 2 months old and already h

Problem with Large Datasets

2009-06-16 Thread Femi Taiwo
Hi all, I'm having a scalability problem, and urgently need to refactor. The project is just 2 months old and already has over 20,000 users. How do you handle passing an array with 5000+ values as a condition e.g. $conditions = array('User.id'=>$bigArray); As the records grow bigger, it tak

Re: Why i get this warning

2009-01-09 Thread Femi Taiwo
In your users_controller.php, remove the closing ?> tag. If the error does not occur, then it's a whitespace that is causing the issue. You should make sure that your controllers do not contain any lines after or before your opening and closing php tags Femi On Fri, Jan 9, 2009 at 12:46 PM, m

Re: Index.php's controller?

2009-01-08 Thread Femi Taiwo
Yes you can set the default controller and action right there in routes.php. Look for an area that looks like this Router::connect('/', array('controller' => 'pages', 'action' => 'display')); Femi T On Thu, Jan 8, 2009 at 1:48 PM, Steppio wrote: > > Yeah that helps a lit

Re: URL not Found Error

2008-09-07 Thread Femi Taiwo
1. Open up app/config/core.php 2. Look for debug. 3. Set to 1 or 2 Refresh your browser and see the actual problem. lizzeelike wrote: i have create all files for creating new blog. but when i try to access the following url http://localhost/cakePHP/posts/index it shows such error: Not

Re: how layout and pages are related..plz explain

2008-07-21 Thread Femi Taiwo
Siebren is right, you need to add the contents_for_layout in the body section of your default.ctp However, to make it easier for you to start up and continue from where you are right now, go to cake/libs/views/layouts/default.ctp and copy its contents to your app/views/layouts/default.ctp. The

Re: Entire site not working

2008-07-17 Thread Femi Taiwo
Romeo, I think there's some invalid character in your default.ctp file. I'm still seeing the same error I saw earlier - Parse error: syntax error, unexpected T_STRING in /var/www/virtual/cjmg.co.nz/htdocs/app/views/layouts/default.ctp on line 1 Meaning, php is supported, your files are ther

Re: Entire site not working

2008-07-17 Thread Femi Taiwo
Hi Romeo, It's throwing this error Parse error: syntax error, unexpected T_STRING in /var/www/virtual/cjmg.co.nz/htdocs/app/views/layouts/default.ctp on line 1 It's a syntax error, not CakePHP. Open that file and fix the problem. Romeo wrote: Gidday, I've done a few sites in CakePHP abou

Re: Update from 1.2 beta to rc leads to huge perfomance drop

2008-06-07 Thread Femi Taiwo
Hi, Here a quick 4-step primer to get better performance in cake 1. Specify var $recursive = 0; in your app/app_model.php     This will cut off all automatic calls to hasMany& haBtm relationships by default. three-quarters of the time, I don't want those results - I simply need the belongsTo

Re: problems with bake

2008-04-29 Thread Femi Taiwo
Hi Chuck, what you need to do is run the cake.bat from the command line, not by double clicking. A quick example. The name of my project is snippets, and my project root is C:\apache2triad\htdocs\snippets\ so I have inside snippets my cake,app and vendors folder. Kool? Click on the start menu

Re: I18n, is this correct way? Configure::write('Config.language', "en");

2008-04-22 Thread Femi Taiwo
Additional Info: Also add this to your beforeFilter.     Configure::write('Cache.disable', Configure::read('debug')); ... Your default.po file is by default cached, so any changes you make to it while developing does not show up for a while. With this, if you're in debug mo

Re: Function in view ....

2008-04-20 Thread Femi Taiwo
Hi John, since it's a view logic, what you need is a helper Find out how to create and use a helper here-> http://book.cakephp.org/view/100/cakephp-core-helpers John R wrote: I have an "activity list" and am saving the creation datetime in the database. In my view, I want to be able to sa

Re: How to include a php file in php cake

2008-04-19 Thread Femi Taiwo
Hi Rocky, In Two Simple Steps: 1. copy the file you want include to your "ROOT-FOLDER/vendors" folder. 2. In your controller , use vendor('filename'); Assuming I want to include workflow.php, my folder structure is |-htdocs     |-app     |-cake     |-docs     |-vendors So I

Re: a couple of small things I can't figure out

2008-04-19 Thread Femi Taiwo
ike  ">A" ,">=A" etc... 2..How can I alter the length of a form input field using form helper? ANSWER: echo $form->input('age',array('size'=>'5')); That's the size...not maxlength.for textboxes, rows and cols are for text

Re: single view for multiple controllers

2008-04-17 Thread Femi Taiwo
Um. I practically rolled on the floor when  I saw the one-liner that did what you wanted. The method I gave was a case of using shot-gun to kill a fly.(w.r.t the case in view) That method allows you to create reusable elements in cake. Consider for example that you want to have

Re: SIte Homepage loading very slowly

2008-04-16 Thread Femi Taiwo
Yes fix that error. The size of the initial page of your site (which is the homepage when you hit your url for the first time) is roughly 225KB because of the js (prototype & scriptaculous) and css files (style.css) That's why it takes so long when you visit the home page for the first time.

Re: single view for multiple controllers

2008-04-16 Thread Femi Taiwo
Hi Damo, The way to solve it is by using elements. Create viewall.ctp and viewx.ctp in the views folder for your controller. In viewall.ctp, add this echo $this->renderElement('studentsinfo'); ?> Add the same thing to viewx.ctp as well. Finally, create "studentsinfo.ctp" in your vie

CakePHP & Workflows

2008-04-04 Thread Femi Taiwo
Hello all, Please has anyone succeeded in integrating a workflow engine with CakePHP? I'm currently looking at the open source ezComponents (http://ezcomponents.org) and the WorkFlow engine they have. Can't seem to be able to make head or tail of where to begin, even after going through the i

Spoofing / Otherwise $this->data

2007-09-18 Thread Femi Taiwo
other alternatives I see is to extract manually from $this->data what I want to insert or by always setting $this->data['Article']['id'] to null in my controller and any other controller actions that creates new records. Really awkward stuff So the easiest fix is the one

Best Practices - "Modular Blocks & Actions"

2007-08-15 Thread Femi Taiwo
d working with modules dynamically, allowing the portal to have a loosely defined structure. I've also be able to effect calls using ajax and updating another block on the page. Apart from the overhead, what other possible failings does this method have? Otherwise, what do I do instead?

Re: CakePHP + AJAX+ charsets

2007-08-01 Thread Femi Taiwo
rom my default layout. Femi francky06l wrote: Are the errors you see are in the language file for French ? If so, I think you should save your language file in UTF-8 without BOM. On Aug 1, 11:29 am, Femi Taiwo <[EMAIL PROTECTED]> wrote: Hi, The i10n version (french in this

CakePHP + AJAX+ charsets Part 2

2007-08-01 Thread Femi Taiwo
Hi, Using firebug for firefox, I was able to pin point the problem to the fact that by default, the request header returned to the ajax call made is UTF-8, so I've just added the following code to my custom app_controller.php and everything is fine now function beforeRender(){ if(!heade

CakePHP + AJAX+ charsets

2007-08-01 Thread Femi Taiwo
Hi, The i10n version (french in this case) of my cakephp application shows up with invalid characters, if I'm loading up the view using ajax. If i use the classic full reload of the page, everything's normal, but views loaded using ajax do not render well. Accented characters show up as question

Re: Cakephp Installation

2007-07-27 Thread Femi Taiwo
You could start from this the cakephp.org site. Have a look at this http://manual.cakephp.org/appendix/blog_tutorial http://manual.cakephp.org/appendix/blog_tutorial saritha wrote: > Hi all, > > Iam unable to configure cakephp.I get confused.I have gone thru the > manual also.pl help me in thi

Re: Creating/Saving Multiple Records

2007-07-26 Thread Femi Taiwo
this->SomeModel->query(); cheers! On Jul 26, 4:21 pm, Femi Taiwo <[EMAIL PROTECTED]> wrote: Hi, Question Summary: Is there a way to insert multiple rows into just one table without using a for...loop or something similar? I need to insert about several new rows into a

Creating/Saving Multiple Records

2007-07-26 Thread Femi Taiwo
Hi, Question Summary: Is there a way to insert multiple rows into just one table without using a for...loop or something similar? I need to insert about several new rows into a table. By using a loop I use something similar to what I've written below Classperiod->create($currentData); $thi

Re: Hidden field update using Ajax

2007-06-28 Thread Femi Taiwo
Quick solution?: Take a look at the $options array, esp. the $options['complete'] , put in js code to be called when the ajax call is complete. You can then do what ever you like with the results and still update the div. Other than that, I haven't found any other way. Let's know how it goes. C

Re: External JS in Ajax loaded DIV?

2007-06-26 Thread Femi Taiwo
Hi, Though I haven't tried thesemyself, but i think you shd take a look at http://ajaxpatterns.org/On-Demand_Javascript, esp. JSAN or Dojo, you may need to also strip out what you don't need to reduce the overall size... Cheers Femi [EMAIL PROTECTED] wrote: > Hi everyone, > > Just a quick quest

Re: IDE PHP and Tools

2007-06-26 Thread Femi Taiwo
Hi Bakers :-) Zend Development Environment/ Zend Studio. Been using it for about 2months. Really great. Features? Check http://www.zend.com/products/zend_studio Rodrigo Castilho Galvão Ferreira wrote: > Hi Cakers, > > Which is IDE that you use for development PHP? > > Complete list: > http://www