Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sql to migration codeigniter online

$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 by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sql #migration #codeigniter #online
ADD COMMENT
Topic
Name
5+4 =