Mysql Tutorial With Query Examples

If you want to start reading mysql tutorials, then you keep close attention in this post. In this post i will share Our tutorial will helping you for access and manipulate data in: MySQL database systems.

What Can You Do With MYSQL?

1) MYSQL can execute queries against a database2) MYSQL can Select data from a database3) MYSQL can insert records in a database4) MYSQL can update records in a database5) MYSQL can delete records from a database6) MYSQL can create new databases7) MYSQL can create new tables in a database8) MYSQL can create stored procedures in a database9) MYSQL can create views in a database.

The PHP functions for use with MySQL have the following

1

2

3

4

5

mysql_connect("Hostname","username","password");

mysql_query($connect,"SQL statement");

Following example shows a generic syntax of PHP to call any MySQL function.

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

<html>

<head>

<title>PHP with MySQL</title>

</head>

<body>

<?php

$conn=mysql_connect("Host name","user name","password"));

if(!$conn)

{

die("Error: a related error message");

}

else

{

echo"Database connected!";

}

?>

</body>

</html>

About: Prem Tiwari

Prem Tiwari is the founder of FreeWebMentor.com and also a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies. View all posts by Prem Tiwari