المشاركات

عرض الرسائل ذات التصنيف CodeIgniter Database Tutorials

PHP CodeIgniter Tutorials for Beginners Step By Step: Learn From Scratch

صورة
Hi, Welcome to our PHP CodeIgniter Tutorial Series. These step by step tutorials are intended for beginners who want to start learning php codeigniter from scratch. It will start right away from setting up the codeigniter framework working environment and move on to more advanced topics covering codeigniter framework libraries, helpers and active record class for database communication. Another nice perk with this series is you will get to know about the popular twitter bootstrap css framework while learning. Why You Should Learn CodeIgniter Framework? CodeIgniter Framework is developed by EllisLab and now it is taken by British Columbia Institute of Technology. It is the simplest and light-weight PHP framework which lets you create robust web applications in no time. It is greatly appreciated for its speedy performance and smaller learning curve and suitable for highly scalable applications. And even though php codeigniter framework loosely follows Model-View-Controller pat...

Codeigniter Login and Registration Tutorial & Source Code

صورة
Today we'll see a codeigniter tutorial demonstrating user login and registration system . As you know Login and Signup Module (User Management System) forms the base for membership driven websites and applications. I have written about codeingiter login and registration process separately earlier, but got requests from blog readers to provide a complete user management module. So in today's post, I have tried to cover as much as possible in user module comprising home, login, signup and user profile/dashboard page. So let us see how to create complete codeigniter login and registration system. Create Database for CI Login & Signup Module: First create the mysql database required for the codeigniter user management system. Read Also: CodeIgniter Two-Step Registration Form with Email Confirmation CodeIgniter Pagination Script with Search Filter using Bootstrap How to Retrieve Data From Database using CodeIgniter & AJAX CREATE DATABASE `testdb`; USE `testd...

How to Update Data in Database using ID in CodeIgniter

صورة
How to update data in database using id in codeigniter? . Using codeigniter update query will let you perform update operation on database. In the previous post, I explained you about how to insert data into database using codeigniter and bootstrap . This tutorial will demonstrates you about updating database records in codeigniter. CodeIgniter DB Update is going to be very easy as we have made required ground coding in CodeIgniter Database Insert tutorial. The update model, controller, and the view files will share some of the same features like insert along with fewer coding of its own. Update Data in Database using ID in CodeIgniter If you are a regular reader of Koding Made Simple , then you would have known, in most of my tutorials I use Twitter Bootstrap CSS Framework to design the front end. In this codeigniter database update tutorial too, I'm going to combine bootstrap with codeigniter to design the update form. Setting up MySQL Database For DB, I'm going to...

CodeIgniter Database CRUD Tutorial for Beginners with Examples

صورة
CRUD is one of the primary functions of a Database Management System. It stands for the four basic operations Create, Read, Update and Delete performed on databases. In SQL, it represents INSERT (Create), SELECT (Read), UPDATE (Update) and DELETE (Delete) commands. Learning the Database CRUD process is essential in application development especially when you want to work with databases. In this codeigniter tutorial, we'll see about building database CRUD operations using CodeIgniter and MySQL Database in detail. Building Database CRUD Operations in CodeIgniter To understand CRUD in a simple way, let us consider an example say you develop a web application which handles employee details of a business venture. At the minimum level the application should allow to add (Create), list (Read), update and delete the employee records. So to implement a CRUD process in applications, you should develop some user interface for the user to perform the above said tasks. Codeigniter f...

How to Connect to Multiple Databases in CodeIgniter

صورة
Connecting to multiple databases is simpler in CodeIgniter . All you have to do is to establish a separate connection for each database you wish to work. At times you may want to work with multiple databases from same or different servers. In core PHP, you can do it by creating separate connection object. And in codeigniter you have to set up separate connection settings for each database you wish to connect. Here I'll show you how to connect with two MySQL Databases . Connecting to Mulitiple Databases in CodeIgniter 1. Open the "application/config/database.php" file. 2. You can see a list of default connection settings provided. Now enter the hostname, username, password, database & database prefix (if any) you want to connect. $db['default']['hostname'] = 'localhost'; $db['default']['username'] = 'mysql_username'; $db['default']['password'] = 'mysql_password'; $db['default']...

How to Fetch Data from Database in CodeIgniter

صورة
How to fetch data from database in codeigniter? CodeIgniter is the simplest and light PHP framework which lets you create robust web applications in no time. Using Twitter Bootstrap with CodeIgniter saves the hassle of writing CSS Stylesheets for your app and lets you focus on development. Later you can customize bootstrap styles to suit your need. That is the best part of using MVC pattern as the presentation (view) is separate, you can change the look and feel of the app anytime without disturbing the rest of it. kodingmadesimple.com have good amount of twitter bootstrap tutorials about customizing bootstrap 3 and I recommend you to go through our bootstrap tutorials section. Fetch Data from Database in CodeIgniter: Now we'll see how to read data from MySQL Database and display it in a neat table format with Bootstrap. Since we are going to use bootstrap we don't want to write any custom stylesheets for formatting the display. If you are not familiar with using B...

How to Delete Data from Database in CodeIgniter

صورة
How to delete data from database in codeigniter? Over sometime I have been writing tutorials about codeigniter crud process like insert, update and fetch. This tutorial is the last part of the codeigniter crud series and it is about database delete in codeigniter and bootstrap frameworks. For the delete process, we are going to use codeigniter delete query which allows us to delete one or more records from database table. Create MySQL Database As for the database I'm going to use the same MySQL Database I have used in Insert and Update tutorials. To create the sample Employee DB, run these sql commands in MySQL. SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; CREATE TABLE IF NOT EXISTS `tbl_department` ( `department_id` int(4) NOT NULL AUTO_INCREMENT, `department_name` varchar(80) NOT NULL, PRIMARY KEY (`department_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; INSERT INTO `tbl_department` (`department_id`, `department_name`) VALUES (1, 'Finance...