1 answer
0 votes
Best practice for sending information to views
I haven't found any good examples of what best practice is with CakePHP. In the controller, should you always strive to have only one "set" method in the action, and do all joins with "containable" behavior, like...
0 answers
0 votes
Paginator use LIKE when sorting
I want the paginator()-sort() to use LIKE instead of merely the field name. Since my field has multiple zip codes per user within it, it needs to 'SEARCH' for them rather than just sorting, it needs to search and then sort.
Here is my index() code...
1 answer
0 votes
How can i found my action ?
Hi,
How can i found my action ?
I have tried all the stuffs l;ike :
$this-params['controller'];
$this-params['action'];
etc.......
I got controller name from this...
0 answers
0 votes
How to improve view cache for XML
Hi,
I want to improve caching for XML files in Cake. I tried the normal view caching but is is not honoring pagination params and does not sends out the right content-type.
I know have this in app_controller. It checks if the reuest accepts XML...
0 answers
0 votes
Web service Controller File exists, but CakePhp giving error
HI! I'm trying to create the web service in the cakePhp. I'm new to cakePhp and only recently start working on it. I found a useful tutorial at http:www.littlehart.net/atthekeyboard/2007/03/13/how-easy-are-web-services-in-cakephp-12-really-easy/...
0 answers
0 votes
Manipulating Form field's data
Hi,
I am fairly new to cakePHP.
Using Bake I have created my models, controllers and views.
I have a long form on one page which collects data and saves to several models. I have managed to save data into several models from one form using the...
1 answer
0 votes
Fatal error: Call to a member function trigger()
Когда пытаюсь проверить данные в контроллере с помощью
$this->User->validates()
получаю Fatal error:
Fatal error: Call to a member function trigger() on a non-object in /usr/local/apache2/htdocs/cakephp/cake/libs/model/model.php on line 2456
В...
1 answer
0 votes
How to use 2 tables in a single cotroller
Hello
I an using a UserController to add/edit/list users. In the user table we have a field called country_id.In the database we have another table called country which contains all the Countries.
For the above purpose i ahve created a country...
0 answers
0 votes
Récupérer les données d'une vue pour l'utiliser dans une autre
Bonjour,
J'ai créé un formulaire de recherches se basant ( pour l'instant ) sur les critères du nom et prénom. Après avoir rempli ces critères, les résultats s'affiche dans un tableau avec l'id de chaque fiche. L'utilisateur saisie l'id de la...
0 answers
0 votes
HABTM find not getting all data.
When I go to fetch the user data in screenplays_controller.php, it only returns the screenplay data. I need the user id to verify that the screenplay belongs to the currently authenticated user.
I'm using CakePHP 1.3
The relationship:
screenplays...
0 answers
0 votes
testAction, загрузка файлов на сервер
Здравствуйте, подскажите кто-нить. Каким образом, можно произвести тестирование загрузки фалов?
Есть у меня контроллер, например, goods_controller.php. И вот в процессе тестирования его методов при помощи testAction, столкнулся с данной...
1 answer
0 votes
Undefined property error, but relationships seem correct
I'm having a slight problem that I can't figure out, but should be really simple.
I have the following model structure:
ProspectiveQuote [hasMany] QuoteUnit [belongsTo] Unit
but in my ProspectiveQuotesController the...
1 answer
0 votes
Passing variables in the app.
Hi
I am trying to learn CakePHP through trial and error, I understand that controllers are responsible for passing variables to the views but there is one situation where I am stuck. I have this code in my app controller
function beforeRender ()... 0 answers
-1 votes
Problem with insertion of mutiple numbers seperated by a newline
hi!!
This is my model:
code:
<?php
class Number extends AppModel
{
var $name = 'Number';
}
?
This is my Controller:
code:
class NumbersController extends AppController
{
var $name = "Numbers";
function...
0 answers
0 votes
cake book example find 'list' incorrect ?
cake own book example creates SQL Error: 1054: Unknown column 'Article.status' in 'where clause' **** column Article.status is there though. Anyone knows the reason ? Book’s Code : $allPublishedAuthors = $this-Article-User-find('list',...
1 answer
0 votes
Cake1.3, Paginate with fulltext search is having problems when going to page 2 and so on?
My code here at the bin (controller/action):
http:bin.cakephp.org/saved/60040http:bin.cakephp.org/saved/60040
View of that controller:
http:bin.cakephp.org/view/87988950http:bin.cakephp.org/view/87988950
Is capturing data using.
$keywords =... 1 answer
1 vote
Hi,I am new to cake php and having problem in data insertion.
I have a text area which accepts multiple numbers separated by a new line.I have done this type of functionality earlier in php using the explode() function.But over here in cake php I am not able to use the explode function properly. here is my...
1 answer
-1 votes
CLI has stop working..
I use window7 to run cakephp. But while i want to run by command ('cake') prompt, some error was created ('CLI has stop working'). That's big problem for me to install at my laptop. Please help me. Thank you.
1 answer
0 votes
Multiple Web Parts in 1 layout
I have 2 menus. One of them can be simple element since it doesn't use any db data.
The other menu uses database. so it will have multiple views to get more menu items in it, but how to CONSTANTLY SHOW IT IN PAGE?
I have read some interesting...
1 answer
0 votes
Error whiling baking controller
I get an error when I try to bake a controller. The error is
Fatal error: Call to undefined function mysql_query() in D:\EasyPHP\www\cake\cake\libs\model\datasources\dbo\dbo_mysql.p
hp on line 588
I'm using cakePHP 1.3.2 stable. What could be...