Questions tagged as 'cakephp-2'

1
answer

How to check if a record exists in cakephp 2.6?

I wonder if a record exists in cakephp 2.6 As everyone knows, cakephp has to use the id key, however this table is a key composed of 4 fields. I gave a read and tried using beforeSave (), checkUnique and could not get it to work. I'm a be...
asked by 24.05.2016 / 16:40
0
answers

Recursion of folders and files stored in the Database - PHP

I have a system using CakePHP, in one of the pages there is the possibility of registering folders and recursive files, which are saved in the database. Now, I need to query these folders and files, logically with recursion and reproduce somethi...
asked by 06.11.2015 / 13:55
1
answer

CakePHP structure [closed]

I'm starting a project in CakePHP 2.X and it has CMS + Website. I would like to know the best way to structure the files, as I would not like to keep all the files together, that is, the Back and Front files in the same Model, Controller and...
asked by 28.11.2015 / 17:39
0
answers

Converting Data To Milliseconds

I would like some help to convert this function to the Cakephp standard. It takes the date from datetimepiker and it turns into milliseconds, but I searched a lot and did not find anything like that for CakePHP . public function add()...
asked by 11.08.2015 / 21:50
1
answer

set :: sort CakePHP array

I need to sort an array in cakephp according to the order passed by parameter. The code that does the sort would be this: //Realizar a ordenação de acordo com o que receber do formulário no ajax if ($this->request->data['Adverte...
asked by 08.05.2015 / 15:36
1
answer

How to hide given in a table according to the status

I have a code that fetches the data in the database and prints a table on the screen. My table that appears on the user's screen has the fields: Referência | Abertura |Status |Objeto Reference is an ID, Open is a date and time, St...
asked by 26.03.2015 / 03:25
1
answer

Relationship between table A and B returns error because it calls data from table C in CakePhP

I am 3 days beating headache with a problem: I have some tables in the system and this error happens in the most improbable screens. I'll give you the latest example:    2015-03-13 16:37:51 Error: [PDOException] SQLSTATE [42S22]: Column no...
asked by 13.03.2015 / 20:53
1
answer

Error in database query with cakephp-2

I'd like to know what's wrong with my query. I'm debugging it, and it's bringing all the results of the ModelHorario template and not just one result per user, ie the fields, group, and order are not being considered. $us['joins'] = array( ar...
asked by 24.02.2015 / 17:02
1
answer

Console. My application works normally but I can not use the Console

My application usually works more when I try to use the Console it gives the following error:    PHP Warning: include (Cake / Console / ShellDispatcher.php): failed to   open stream: No such file or directory in   /home/devidy/www/en/Console/...
asked by 28.01.2015 / 20:08
0
answers

Fields filled with zip code in CakePHP 2.x

I'm trying to autocomplete fields in CakePHP from a zip code, I'm adapting the code found on this site: link I used the following site as an example to know how to configure ajax requests for the Framework: link Here is my code:...
asked by 01.02.2015 / 22:16