Php connectivitywithmysql

30
11-Sep-2014 Thursday Connectivi ty With MySQL

description

It gives all information about connectivity

Transcript of Php connectivitywithmysql

Page 1: Php connectivitywithmysql

11-Sep-2014Thursday

Connectivity With MySQL

Page 2: Php connectivitywithmysql

• Introduction• What is MySQL• Create Database• Basic MySQL Operations• Basic MySQL Functions• Benefits• Drawbacks• Conclusion

Points of Discussion2

Page 3: Php connectivitywithmysql

Introduction3

• A database is an application that manages data and allows fast storage and retrieval of that data.

A database is a collection of information that is organized so that it can easily be accessed, managed, and updated.

Page 4: Php connectivitywithmysql

Example of Database

• Sql Server

• Oracle• FoxPro• MongoDB• Microsoft Access

4

MySQL

Page 5: Php connectivitywithmysql

What is MySql

MySQL

Page 6: Php connectivitywithmysql

MySql6

• MySQL is a database.

• The data in MySQL is stored in database objects called tables.

• A table is a collections of related data entries and it consists of columns and rows.

• Databases are useful when storing information categorically.

Page 7: Php connectivitywithmysql

Continue

• Download MySQL Database

• If you don't have a PHP server with a MySQL Database, you can download MySQL for free here:

http://www.mysql.com/downloads/index.html

7

Page 8: Php connectivitywithmysql

Continue

• MySQL works on many operating systems and with many languages including PHP, PERL, C, C++, JAVA etc.

• MySQL is very friendly to PHP, the most appreciated language for web development.

8

Page 9: Php connectivitywithmysql

How to Create Database?

MySQL

Page 10: Php connectivitywithmysql

How to Create Database10

Page 11: Php connectivitywithmysql

Give Database Name11

Page 12: Php connectivitywithmysql

Give Table Name & No of Columns

12

Page 13: Php connectivitywithmysql

Field Name13

Page 14: Php connectivitywithmysql

Table Created14

Page 15: Php connectivitywithmysql

Structure of Table15

Page 16: Php connectivitywithmysql

Basic MySQL

Operation

MySQL

Page 17: Php connectivitywithmysql

Basic Operations

• Create table• Insert records• Retrieve records• Update records• Delete records• Modify table• Join table• Drop table

17

Page 18: Php connectivitywithmysql

Basic MySQLFunctions

MySQL

Page 19: Php connectivitywithmysql

Basic MySQL Functions

• mysql_connect()• mysql_select_db()• mysql_query()• mysql_featch_row()• mysql_featch_array()• mysql_affected_row()• Mysql_close()

19

Page 20: Php connectivitywithmysql

Mysql_connect()

• Purpose:-»This Function is used to connect

your application with database.

• Syntax:-

20

Bool mysql_connect(“servarname”,”username”,”password”);

Page 21: Php connectivitywithmysql

Mysql_select_db()

• Purpose:-»This Function is used to select

particular database from phpmyadmin database.

• Syntax:-

21

bool mysql_select_db(“Databse Name”);

Page 22: Php connectivitywithmysql

Mysql_query()

• Purpose:-» Sends the specified SQL query to

the database specified by the resource identifier. The retrieved data are returned by the function as a MySQL result set.

• Syntax:-

22

Record set mysql_query(“sqlquery”);

Page 23: Php connectivitywithmysql

Benefits

MySQL

Page 24: Php connectivitywithmysql

Benefits

• Open Source

• Easy, Fast and High Performing

• Cross Platform Supports

• Occupies very less disk space.

24

Page 25: Php connectivitywithmysql

Drawbacks

MySQL

Page 26: Php connectivitywithmysql

Drawbacks

• Developers accuse MySQL for not having a good developing and debugging tool compared to paid databases.

• MySQL cannot work efficiently with large databases.

26

Page 27: Php connectivitywithmysql

Conclusion

MySql is an Open Source database Management System and Support Major features of the

RDBMS.

There is no need of Purchase any other thing, we have to just install and done.

27

Page 28: Php connectivitywithmysql

Demo

MySQL

Page 29: Php connectivitywithmysql

Reference

www.mysql.com www.slideshare.com www. Wikipedia.com

29

Page 30: Php connectivitywithmysql

That’s All for PHP With

MySQLThank You…!!!

MySQL