Skip to content

Xaobin/CI4_Mysql_Joins

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

CODEIGNITER 4

Exemplos de MYSQL JOINS

INNER JOIN LEFT JOIN RIGHT JOIN

MySQL Database: cihelp

MySQL Tables

CREATE TABLE `tbl_users` (
 `id` int(11) NOT NULL AUTO_INCREMENT,
 `name` varchar(120) DEFAULT NULL,
 `email` varchar(120) DEFAULT NULL,
 `phone_no` varchar(120) DEFAULT NULL,
 `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
 PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


CREATE TABLE `tbl_courses` (
 `id` int(11) NOT NULL AUTO_INCREMENT,
 `name` varchar(120) NOT NULL,
 `user_id` int(11) NOT NULL,
 PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

Instalação

  • Substituir a pasta app original pela app disponível
  • Mudar o ENV para .env e realizar as mudanças padrão do framework
  • Adicionar as tabelas ao banco de dados
  • Relizar as mudanças necessárias em app/config/app.php e database.php

    Installation

  • Replace the original app with the available folder
  • Make the default changes in the .env
  • Add the tables to the database
  • Do the necessaries changes in app/config/app.php and database.php