RSSCategory: CakePHP

Ajax In Place Autocomplete Editor for CakePHP

July 29, 2007 | By | 3 Replies More
Ajax In Place Autocomplete Editor for CakePHP

The Scriptaculous InPlaceEditor and Autocompleter are very useful, and I needed a combination of them: when you click on a field to edit it, the Autocompleter comes up with a list of options, then after you choose an option and click “ok”, the ID of the selected element is sent to the server and the […]

Read More

Last updated December 22, 2013

CakePHP – Do not name a table “models”!

July 5, 2007 | By | Reply More
CakePHP – Do not name a table “models”!

I’m making a clock model database. Naturally enough, I named one of my tables “models”. Using CakePHP, I could enter data into the table, but neither data validation nor table associations would work. I renamed the table to “item” and everything is fine. Likewise, I suppose, a table should not be named “views” or “controllers”. […]

Read More

Last updated December 22, 2013

CakePHP: Many views – one controller

July 4, 2007 | By | 2 Replies More
CakePHP: Many views – one controller

If you want multiple controllers to be able to share a view, do this: Put the shared views in the views/common directory Call a shared view like this: $this->render(‘../common/view_name’); Share this post:

Read More

Last updated December 22, 2013

Query Caching Using query($sql) Breaks getNumRows()

March 16, 2007 | By | Reply More
Query Caching Using query($sql) Breaks getNumRows()

I am using Cakephp 1.1.11.4064 and a Postgresql database. I was having trouble in my application where the value returned from getNumRows() was incorrect in certain places. The problem turned out to be Cake’s query caching. Example code $sql_1 = “sql statement 1;”; $parent_result_1 = $this->query($sql_1); . . . Lots of code here . . […]

Read More

Last updated December 22, 2013