 MySQL is a database system used on the web  MySQL is a database system that runs on a server  MySQL is ideal for both small and large applications.

Slides:



Advertisements
Similar presentations
PHP: Date() Function The PHP date() function formats a timestamp to a more readable date and time.
Advertisements

30-Jun-15 SQL A Brief Introduction. SQL SQL is Structured Query Language Some people pronounce SQL as “sequel” Other people insist that only “ess-cue-ell”
Intermediate PHP & MySQL
1ISM - © 2010 Houman Younessi Lecture 3 Convener: Houman Younessi Information Systems Spring 2011.
PhpMyAdmin What is PhpMyAdmin?  PhpMyAdmin is one of the most popular applications for MySQL databases management. It is a free tool written in PHP.
DAT702.  Standard Query Language  Ability to access and manipulate databases ◦ Retrieve data ◦ Insert, delete, update records ◦ Create and set permissions.
What is MySQL? 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.
© Yanbu University College YANBU UNIVERSITY COLLEGE Management Science Department © Yanbu University College Module 6:WEB SERVER AND SERVER SIDE SCRPTING,
INTERNET APPLICATION DEVELOPMENT For More visit:
CPS120: Introduction to Computer Science Information Systems: Database Management Nell Dale John Lewis.
Advanced Database Management System Lab no. 11. SQL Commands (for MySQL) –Update –Replace –Delete.
PHP MySQL Introduction
LOGO 1 Lab_02: Basic SQL. 2 Outline  Database Tables  SQL Statements  Semicolon after SQL Statements?  SQL DML and DDL  SQL SELECT Statement  SQL.
CHAPTER 7 Database: SQL, MySQL. Topics  Introduction  Relational Database Model  Relational Database Overview: Books.mdb Database  SQL (Structured.
 SQL stands for Structured Query Language.  SQL lets you access and manipulate databases.  SQL is an ANSI (American National Standards Institute) standard.
INTERNET APPLICATION DEVELOPMENT PRACTICAL ON CONNECTING TO MYSQL.
 Mysql – popular open-source database management system  PHP usually works with Mysql for web- based database applications  LAMP applications—Web-based.
Introduction to databases and SQL. What is a database?  A database is an organized way of holding together pieces of information  A database refers.
15/10/20151 PHP & MySQL 'Slide materials are based on W3Schools PHP tutorial, 'PHP website 'MySQL website.
Introduction to MySQL Lab no. 10 Advance Database Management System.
PHP MySQL Introduction. MySQL is the most popular open-source database system. What is MySQL? MySQL is a database. The data in MySQL is stored in database.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
CPS120: Introduction to Computer Science Lecture 19 Introduction to SQL.
Structure Query Language SQL. Database Terminology Employee ID 3 3 Last name Small First name Tony 5 5 Smith James
SQL Unit – 2 Base Knowledge Presented By Mr. R.Aravindhan.
DAT602 Database Application Development Lecture 3 Review of SQL Language.
1 DBS201: Introduction to Structure Query Language (SQL) Lecture 1.
SQL Basics. What is SQL? SQL stands for Structured Query Language. SQL lets you access and manipulate databases.
SQL Basic. What is SQL? SQL (pronounced "ess-que-el") stands for Structured Query Language. SQL is used to communicate with a database.
LOGO 1 Lab_04: Basic SQL. 2 Outline  The ORDER BY Keyword  SQL ORDER BY Syntax  SQL NULL Values.
SQL. คำสั่ง SQL SQL stands for Structured Query Language is a standard language for accessing and manipulating databases.
Course FAQ’s I do not have any knowledge on SQL concepts or Database Testing. Will this course helps me to get through all the concepts? What kind of.
Database Fundamental & Design by A.Surasit Samaisut Copyrights : All Rights Reserved.
SQL Jan 20,2014. DBMS Stores data as records, tables etc. Accepts data and stores that data for later use Uses query languages for searching, sorting,
PHP and Mysql Database. PHP and Database Mysql – popular open-source database management system PHP usually works with Mysql for web-based database applications.
Module Review Basic SQL commands: Create Database, Create Table, Insert and Select 2. Connect an SQL Database to PHP 3. Execute SQL Commands in.
CHAPTER 9 SQL อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา 1.
PHP Database Pemrograman Internet. PHP MySQL Database With PHP, you can connect to and manipulate databases. MySQL is the most popular database system.
LECTURE 3 MYSQL Database. PHP MYSQL CONNECTION MySQL is a database system used on the web MySQL is a database system that runs on a server MySQL is ideal.
>> Introduction to MySQL. Introduction Structured Query Language (SQL) – Standard Database Language – Manage Data in a DBMS (Database Management System)
CHAPTER 10 PHP MySQL Database
ECMM6018 Enterprise Networking For Electronic Commerce Tutorial 6 CGI/Perl and databases.
Database: SQL, MySQL, LINQ and Java DB © by Pearson Education, Inc. All Rights Reserved.
Distribution of Marks For Second Semester Internal Sessional Evaluation External Evaluation Assignment /Project QuizzesClass Attendance Mid-Term Test Total.
به نام خدا SQL QUIZ جوانمرد Website: ejavanmard.blogfa.com.
ADVANCED SQL.  The SQL ORDER BY Keyword  The ORDER BY keyword is used to sort the result-set by one or more columns.  The ORDER BY keyword sorts the.
Programming for the Web MySQL Command Line Using PHP with MySQL Dónal Mulligan BSc MA
COM621: Advanced Interactive Web Development Lecture 11 MySQL – Data Manipulation Language.
Chapter 12 Introducing Databases. Objectives What a database is and which databases are typically used with ASP.NET pages What SQL is, how it looks, and.
PHP & MY SQL Instructor: Monireh H. Sayadnavard 1.
SQL SQL Ayshah I. Almugahwi Maryam J. Alkhalifa
Tried my best to simplify it for you!
ORDER BY Clause The result of a query can be sorted in ascending or descending order using the optional ORDER BY clause. The simplest form of.
Web Systems & Technologies
From: SQL From:
CHAPTER 7 DATABASE ACCESS THROUGH WEB
Introduction to Structured Query Language(SQL)
Introduction to Web programming
Session 4 PHP & MySQL.
Introduction to Web programming
PHP + MySQL Commands Refresher.
PhpMyaAmin & MySQL PHP: Hypertext Preprocessor.
ISC440: Web Programming 2 Server-side Scripting PHP 3
SQL Tutorial.
Introduction To Structured Query Language (SQL)
SQL Queries Chapter No 3.
Introduction To Structured Query Language (SQL)
Tutorial 6 PHP & MySQL Li Xu
MySQL Database System Installation Overview SQL summary
Introduction to Web programming
Presentation transcript:

 MySQL is a database system used on the web  MySQL is a database system that runs on a server  MySQL is ideal for both small and large applications  MySQL is very fast, reliable, and easy to use  MySQL supports standard SQL  MySQL is free to download and use  MySQL is developed, distributed, and supported by Oracle Corporation  MySQL is named after co-founder Monty Widenius's daughter: My  Structured Query Language

 The data in MySQL is stored in tables.  A table is a collection of related data, and it consists of columns and rows.  Databases are useful when storing information categorically.  A company may have a database with the following tables: ◦ Employees ◦ Products ◦ Order

 A query is a question or a request.  We can query a database for specific information and have a record set returned.  Look at the following query (using standard SQL):  SELECT LastName FROM Employees

 Before we can access data in a database, we must open a connection to the MySQL server.  In PHP, this is done with the mysqli_connect() function.  mysqli_connect(host,username,password,dbname);

 The connection will be closed automatically when the script ends.  To close the connection before, use the mysqli_close() function: 

 The CREATE DATABASE statement is used to create a database in MySQL.  We must add the CREATE DATABASE statement to the mysqli_query() function to execute the command.

 The CREATE TABLE statement is used to create a table in MySQL.  We must add the CREATE TABLE statement to the mysqli_query() function to execute the command.

 $sql = "CREATE TABLE Persons ( PID INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(PID), FirstName CHAR(15), LastName CHAR(15), Age INT )";

 The INSERT INTO statement is used to add new records to a database table.  It is possible to write the INSERT INTO statement in two forms.  INSERT INTO table_name VALUES (value1, value2, value3,...)  INSERT INTO table_name (column1, column2, column3,...) VALUES (value1, value2, value3,...)

 Firstname: Lastname: Age:

 The SELECT statement is used to select data from a database.  SELECT column_name(s) FROM table_name  To get PHP to execute the statement above we must use the mysqli_query() function.

 "; } mysqli_close($con); ?>

 The WHERE clause is used to extract only those records that fulfill a specified criterion.  SELECT column_name(s) FROM table_name WHERE column_name operator value

 "; } ?>

 The ORDER BY keyword is used to sort the data in a recordset.  The ORDER BY keyword sort the records in ascending order by default.  If you want to sort the records in a descending order, you can use the DESC keyword.  SELECT column_name(s) FROM table_name ORDER BY column_name(s) ASC|DESC

 It is also possible to order by more than one column.  When ordering by more than one column, the second column is only used if the values in the first column are equal.  SELECT column_name(s) FROM table_name ORDER BY column1, column2

 The UPDATE statement is used to update existing records in a table.  UPDATE table_name SET column1=value, column2=value2,... WHERE some_column=some_value  Note: Notice the WHERE clause in the UPDATE syntax. The WHERE clause specifies which record or records should be updated. If you omit the WHERE clause, all records will be updated!

 The DELETE FROM statement is used to delete records from a database table.  DELETE FROM table_name WHERE some_column = some_value  Note: Notice the WHERE clause in the DELETE syntax. The WHERE clause specifies which record or records that should be deleted. If you omit the WHERE clause, all records will be deleted!

 Thanks