Questions tagged with controller

1 answer

0 votes

Asked by osmart, 12 hours, 47 minutes ago in

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

Asked by gregwhitworth, 1 week, 2 days ago in

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

Asked by ureshpatel8450, 3 weeks, 2 days ago in

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

Asked by primeminister, 1 day, 5 hours ago in

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

Asked by mas, 2 weeks, 1 day ago in

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

Asked by saeed, 3 weeks, 3 days ago in

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

Asked by komex, on 8/6/10 in

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

Asked by fida, 17 hours, 45 minutes ago in

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

Asked by tzameti, on 29/4/10 in

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

Asked by nutbutter, 2 weeks, 3 days ago in

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

Asked by PALOMINO, on 13/3/10 in

testAction, загрузка файлов на сервер

Здравствуйте, подскажите кто-нить. Каким образом, можно произвести тестирование загрузки фалов?

Есть у меня контроллер, например, goods_controller.php. И вот в процессе тестирования его методов при помощи testAction, столкнулся с данной...

1 answer

0 votes

Asked by deathau, 2 weeks, 4 days ago in

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

Asked by cakenoob, 1 week, 4 days ago in

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

Asked by shreyas1234, on 11/6/10 in

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

Asked by fhxfhx, 3 weeks ago in

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

1 vote

Asked by shreyas1234, on 9/6/10 in

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

Asked by guasyed, on 21/6/10 in

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

Asked by imendars, 1 week, 2 days ago in

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

Asked by jesbin, on 23/6/10 in

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...

<< previous 1   2   3   4   5   6   7   8