07-20-2023, 01:17 PM
Creating a phpMyAdmin Table in CodeIgniter
This section will cover the steps to create a table with phpMyAdmin via hPanel. This table is essential because it will form the basis of our application.
- Log in to your hosting account. Navigate to the Databases section and select phpMyAdmin.
- Look for the database that you have synced with CodeIgniter and click Enter phpMyAdmin:
- Once there, select the SQL section, paste in this query, and press Go:

CREATE TABLE agencies (
id int(11) NOT NULL AUTO_INCREMENT COMMENT 'Primary Key',
name varchar(100) NOT NULL COMMENT 'Name',
email varchar(255) NOT NULL COMMENT 'Email Address',
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT=''AUTO_INCREMENT=1;
INSERT INTO agencies(id, name, email) VALUES
(1, 'Development', 'awesomeinbox@domain.com'),
(2, 'Production', 'sparkingjoy@domain.net'),
(3, 'Testing', 'user@mydomain.com'),
(4, 'Building', 'editor@mydomain.net'),
(5, 'Debugging', 'anotherawesomeinbox@anotherdomain.com');
It will look like this:

This query will automatically create a database filled with the data that we will be able to use later.

