Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating a phpMyAdmin Table in CodeIgniter
#1

    Creating a phpMyAdmin Table in CodeIgniter
   

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.


   
           
  1. Log in to your hosting account. Navigate to the Databases section and select phpMyAdmin.
  2.        
  3. Look for the database that you have synced with CodeIgniter and click Enter phpMyAdmin:
  4.         phpMyAdmin Interface
           
  5. Once there, select the SQL section, paste in this query, and press Go:
  6.    
   
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:

    phpMyAdmin Query
   

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


   


Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)