Skip to content

Instantly share code, notes, and snippets.

Alex M. alexdd55

Block or report user

Report or block alexdd55

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@alexdd55
alexdd55 / gist:642713bef9aa29b051cbc76c411b70b1
Last active Feb 25, 2020
cake model relations and joins on orm
View gist:642713bef9aa29b051cbc76c411b70b1
/* SQL Statement */
DROP DATABASE IF EXISTS `moviestest`;
CREATE DATABASE IF NOT EXISTS `moviestest` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `moviestest`;
DROP TABLE IF EXISTS `categories`;
CREATE TABLE IF NOT EXISTS `categories` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`)
View application.php
<?php
declare(strict_types=1);
/**
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
You can’t perform that action at this time.