This tutorial will show you how to call stored procedure using Codeigniter framework.

Prerequisites

Netbeans 8.2
XAMPP in Windows
Codeigniter 3.1.7

Go through below steps

Step 1. Create a table called user and Stored Procedure in MySQL database. Create database roytuts in MySQL server if it does not exist already.

 

Usage

Step 2. Now first configure Codeigniter 3. with Netbeans 8.2 IDE if you have not configured already. Setup Codeigniter, Netbeans and XAMPP in Windows

Step 3. Open application/config/autoload.php file and autoload few things

Step 4. Open application/config/database.php file and make required changes for database configurations

If you have password for the database then put appropriate password.

Step 5. Create Model class for executing Stored Procedure

Step 6. Create Controller class

Step 7. Create View file for user input

Step 8. Open file application/config/routes.php and change the default controller

Step 9. Now run the application

When you see the form and you do not enter anything and try to submit the form

stored procedure using codeigniter

Once you fill the form with all input fields and you will find one row has been inserted into the database table and you will see the response above the form

User record inserted

Thanks for reading.

Software Professional, I am passionate to work on web/enterprise application. For more information please go to about me. You can follow on Twitter. You can be a friend on Facebook or Google Plus or Linkedin

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.