Sql To Migration Codeigniter Online

[Solved] Sql To Migration Codeigniter Online | Php Frameworks Codeigniter - Code Explorer | yomemimo.com
Question : sql to migration codeigniter online

Answered by : abuzar-munshi

$tableName = "user_type";
$sql = "";
$sql = "CREATE TABLE `$tableName` ( `id` TINYINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , `name` CHAR(120) NOT NULL ) ENGINE = InnoDB;";
echo $this->db->query($sql);
$sql = " INSERT INTO `$tableName` (`id`, `name`) VALUES (1, 'user'), (2, 'provider'), (3, 'admin')";
echo $this->db->query($sql);

Source : https://stackoverflow.com/questions/34222410/codeigniter-3-migrate-sql | Last Update : Thu, 21 Jul 22

Answers related to sql to migration codeigniter online

Code Explorer Popular Question For Php Frameworks Codeigniter