CONTACT @ Skype : rajdimdung   |   call : +977 9841813550

Basic SQL statements: DDL and DML

Post by : Raj Dimdung    Date : 2015-04-14 09:04:39

Basic SQL statements: DDL and DML

In the first part of this tutorial, you’ve seen some of the SQL statements that you need to start building a database. This page gives you a review of those and adds several more that you haven’t seen yet.

SQL statements are divided into two major categories: data definition language (DDL) and data manipulation language (DML). Both of these categories contain far more statements than we can present here, and each of the statements is far more complex than we show in this introduction. If you want to master this material, we strongly recommend that you find a SQL reference for your

Read More

SQL Tutorial

Post by : Raj Dimdung    Date : 2014-11-30 09:28:59

Indroduction

SQL is a standard language for accessing databases.

Our SQL tutorial will teach you how to use SQL to access and manipulate data in: MySQL, SQL Server, Access, Oracle, Sybase, DB2, and other database systems.

What is SQL?

  • SQL stands for Structured Query Language
  • SQL lets you access and manipulate databases
  • SQL is an ANSI (American National Standards Institute) standard

What Can SQL do?

  • SQL can execute queries against a database
  • SQL can retrieve data from a database
  • SQL can insert records in a database
  • SQL can update records in a data

    Read More

PHP Connect to MySQL

Post by :    Date : 2014-11-30 02:07:20

Open a Connection to MySQL Before we can access data in the MySQL database, we need to be able to connect to the server: Example (MySQLi Object-Oriented)

?php
$servername = "localhost";

$username = "username";

$password = "password";
// Create connection
$conn = new mysqli($servername, $username, $password); // set username & Password

// Check connection
if ($conn--->connect_error) {
    die("Connection failed: " . $conn->connect_error);
} 
echo "Connected successfully";

?>

Read More

Open a Connection to MySQL

Post by : Raj Dimdung    Date : 2014-11-29 04:11:41

Open a Connection to MySQL

?php
$servername = "localhost"; // host name server name
$username = "username"; //dataabse username
$password = "password"; // database password

// Create connection
$conn = new mysqli($servername, $username, $password);

// Check connection
if ($conn--->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
?>

Read More

PHP Connect to MySQL

Post by : Raj Dimdung    Date : 2014-11-29 03:57:47

PHP 5 and later can work with a MySQL database using:

  • MySQLi extension (the "i" stands for improved)
  • PDO (PHP Data Objects)

Earlier versions of PHP used the MySQL extension. However, this extension was deprecated in 2012.


Should I Use MySQLi or PDO?

If you need a short answer, it would be "Whatever you like".

Both MySQLi and PDO have their advantages:

PDO will work on 12 dif

Read More