Creating Tables In Codeigniter

[Solved] Creating Tables In Codeigniter | Php - Code Explorer | yomemimo.com
Question : codeigniter create table

Answered by : mushy-mouse-d98scn261rf8

$forge->createTable('table_name', TRUE);
// gives CREATE TABLE IF NOT EXISTS table_name

Source : https://codeigniter4.github.io/userguide/dbmgmt/forge.html#creating-a-table | Last Update : Tue, 02 Jun 20

Question : creating tables in codeigniter

Answered by : roy-jhon-cubillan

CREATE TABLE IF NOT EXISTS `items` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `description` text COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=16 ;

Source : | Last Update : Fri, 05 Aug 22

Answers related to creating tables in codeigniter

Code Explorer Popular Question For Php