Category: PHP

In CakePHP 3, find 10 random blog posts from mysql fast

based on this article: MySQL select 10 random rows from 600K rows fastI am thinking about finding random blog posts in CakePHP. How to use RAND()in query builders?In addition, can you speed

#sql
2 Answers

Category: PHP

In CakePHP 3, Inner join and count records

I want to count female employees per department in CRM, how to build custom query in CakePHP?SELECT     EMP.DeptNo, DEP.DeptName, count(*) AS records FROM    &n

#sql
1 Answers

Category: PHP

In CakePHP 3, identify and remove duplicate records of customers

This is my customers table (example)idnamephonesexstage1John123-456789m02Mary459-234321f33Liza123-123414f14John123-456-789m35Kate999-000999f0...I want to identify and remove duplicate records of custo

#sql
1 Answers

Category: PHP

compact($var) in CakePHP

When you are passing a variable from controller to view, you use the set function, but..Compare$this->set('var', $var);to the following$this->set(compact('var'));Which one is better?  

SOLVED
1 Answers
Kake
Kake

3

Category: PHP

RSS feed view in CakePHP 3

I want to create a view of news for RSS in CakePHP. Now I have all posts set to /news/rss.ctppublic function rss() {     //get recent news     //... &n

#rss
2 Answers
Doug
Doug

3

Category: PHP

Prevent XSS attacking in Cakephp

To create CRUD actions is an easy thing in Cakephp. Now, I want to prevent XSS attacking in Cakephp (XSS headers?), how can I add this security feature to my application?For example, creatin

#xss
3 Answers
Lara
Lara

4

Category: PHP

In CakePHP 3, Nginx 500 internal server error

This is my Nginx config file:server { listen 80; root /var/www/html index index.php index.html index.htm; server_name localhost;     access_log /var/www/log/acce

#nginx
0 Answers
Khan
Khan

3

Category: PHP

Crossover design: CakePHP and Phalcon

I am thinking about using both CakePHP and Phalcon together:CakePHP - for web adminPhalcon - for high performance APIIs this possible?

#phalcon
0 Answers

Category: PHP

Cakephp use query builder in component

How to use Cakephp query builder in component? (PostutilsComponent.php)//controller public function blogPost($post_id = null) {     $this->set('recent_posts', $this->P


0 Answers

Category: PHP

CakePHP access user login status in view

I need CakePHP 3 to access user login status (is logged in or not) in view .ctp file. I'm unable to use AuthComponent or SessionComponent to retrieve user status. I wonder if there is a SessionHelp th

#user
2 Answers