ITSourceCode.com

We Exist to Provide 100% Free Source Code and Tutorials

Custom Search

Category: MySQL Tutorial

14-MySQL Update Data

mysql-php

To Update the existing data in MySQL database you need to used UPDATE statement. Syntax: UPDATE tablename SET column1=val1, column2=val2, column3=val3. WHERE column=value; Take Note! Using the UPDATE command you must not forget to include the WHERE clause, because the Where clause is used to specify record you want to modify. Without having the WHERE clause, all records […]

13-MySQL Delete Data

mysql-php

In Deleting data using MySQL the DELETE Statement is used. Syntax: DELETE FROM tablename WHERE specificcolumn = correspondingvalue   Take Note! Using the DELETE command you must not forget to include the WHERE clause, because the Where clause is used to specify record you want to delete. Without having the WHERE clause, all records in the […]

12-MySQL Select Data

mysql-php

In Selecting one or more records in MySQL database, the SELECT statement is being used. Syntax: SELECT * from tableName; or SELECT column1,column2  from tableName;   The asterisks(*) symbol in our first example syntax represent all column in the database table. In the second example, we specify the column name of a table.   Example […]

11-MySQL Multiple Insert

mysql-php

Performing a multiple query in MySQL, you need to use the function called “mysqli_multi_query”. This function allows you to perform one or more queries against database, you only have to separate the query using semicolon. Example using MySQLi(Object-Oriented):   < View plain text > php <?php $server = "localhost"; $username = "root"; $password = ""; […]

10-MySQL Last Inserted

mysql-php

In our previous lesson we tackle about how to insert record in a MySQL database table. This time we’re going to get the last Inserted ID from our table “tblpeople“. Using the AUTO_INCREMENT field, we are able to get the ID of last inserted or updated record immediately. Since we will be using same code […]

09-MySQL Insert Query

mysql-php

To insert record in MySQL database the statement used is INSERT INTO command. Syntax: INSERT INTO name_of_table (column1, column2, column3,…) VALUES (value1, value2, value3,…)   Rules in performing the INSERT INTO Command: A Numeric Values and NULL word should not be quoted String Values inside SQL query should be quoted Using PHP all SQL query […]

07-MySQL Create Database

In order to create a MySQL database, you must have the privileges to Create or Delete Database. But for this tutorial, let’s assume that you have access to your server in phpmyadmin. Creating MySQL Database using MySQLi and PDO Basically the statement used to create database is “CREATE DATABASE”. In our case, we will be […]

06-MySQL Connect

Since PHP 5 or later can now work with MySQL database the MySQLi or PDO_MySQL extension should be used. The functions include: Mysqli_connect() PDO::_construct() Which is better to use, MySQLi or PDO? Well the answer is depends on you, but both MySQLi and PDO have their advantages: The MySQLi can only work with MySQL databases […]

Page 1 of 212
ITSourceCode.com © 2016 Frontier Theme

Subscribe For Latest Updates

Signup for our newsletter and get notified when we publish new articles for free!