SlideShare a Scribd company logo
Introduction
to
MySQL & PHP
History of SQLHistory of SQL
MySQL & PHP, presented by David
Sands
3
1974 - First version of SQL developed by Donald Chamberlin and Raymond
Boyce at IBM (SEQUEL). Used to manipulate and retrieve data in their
database.
1986 - American National Standards Institute (ANSI) standardizes SQL-86.
1999 – SQL3 supports new features like procedural & control-of-flow
statements, triggers, and regular expressions.
…..
2008 – SQL2008 - still modifying the language to date.
Popular SQL suppliers today
MySQL, Microsoft SQL Server, IBM DB2, Oracle 11g, PostgreSQLSQL
Basic SQL SyntaxBasic SQL Syntax
MySQL & PHP, presented by David
Sands
4
➔ Data Definition Language (DDL)
• CREATE TABLE / DATABASE / VIEW / etc.....
• ALTER ...
• DROP ...
➔ Data Manipulation Language (DML)
• SELECT ... FROM / INTO … WHERE ...
• INSERT INTO ... VALUES ...
• UPDATE … SET … WHERE ...
• DELETE FROM … WHERE ...
Intro to MySQLIntro to MySQL
MySQL & PHP, presented by David
Sands
5
➔ Released 23 May 1995.
➔ 11+ Million web servers using MySQL
➔ Similar, but not exactly same syntax as IBM DB2, Oracle 11g, etc...
➔ Open-source & free to download, under the GNU General Public
License.
➔ Coded in C / C++, Yacc parser, and custom lexical analyzer.
MySQL Tutorial (1 of 2)MySQL Tutorial (1 of 2)
MySQL & PHP, presented by David
Sands
6
➔ Following from MySQL 5.1 Manual (3.3 Creating and using a database)
➔ For Command Prompt usage, follow these steps to use a database.
Enter password: XXXXX
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 4
Server version: 5.1.31-community MySQL Community Server (GPL)
Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
+--------------------+
3 rows in set (0.00 sec)
mysql> USE TEST;
Database changed
➔ You can now perform DML & DDL operations!
MySQL Tutorial (2 of 2)MySQL Tutorial (2 of 2)
MySQL & PHP, presented by David
Sands
7
mysql> CREATE TABLE myTest (time DATE, note VARCHAR(10), id INT);
Query OK, 0 rows affected (0.11 sec)
mysql> DESCRIBE myTest;
+-------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+-------+
| time | date | YES | | NULL | |
| note | varchar(10) | YES | | NULL | |
| id | int(11) | YES | | NULL | |
+-------+-------------+------+-----+---------+-------+
3 rows in set (0.05 sec)
mysql> INSERT INTO myTest VALUES (NULL, "hello", 3);
Query OK, 1 row affected (0.05 sec)
mysql> SELECT * FROM myTest;
+------+-------+------+
| time | note | id |
+------+-------+------+
| NULL | hello | 3 |
+------+-------+------+
1 row in set (0.01 sec)
mysql>
History of PHPHistory of PHP
MySQL & PHP, presented by David
Sands
8
1994 - Rasmus Lerdorf wrote Common Gateway Interface (CGI) Binaries.
1995 - Personal Home Page Tools (PHP Tools) formed.
1997-8 - Zeev Suraski & Andi Gutmans wrote PHP parser. Their PHP3
became the PHP: Hypertext Preprocessor.
To 2008 - Various improvements & bug fixes.
➔ Old versions of PHP – Code not compiled. Only interpreted and run.
➔ After PHP4, Parser compiles input to produce bytecode for Zend Engine
processing.
Intro to PHPIntro to PHP
MySQL & PHP, presented by David
Sands
9
➔ PHP file runs on web server, inputs PHP code, compiles to bytecode,
outputs Web Pages.
➔ Creates Dynamic Web Pages, using Server Side Scripting. (like .asp, .jsp,
perl). Clients “Run” these web pages when visited.
➔ Similar programming structure / syntax as C or Javascript. Other “Tools”
included in PHP releases like ImageJPEG($im,$destpic,
$jpeg_thumb_quality);
➔ HTML (markup language) usually used along with PHP.
PHP SyntaxPHP Syntax
MySQL & PHP, presented by David
Sands
10
➔ <?php PHP code here ?>
➔ $variable //automatic type detection on assignment.
➔ $ is escape character for variables within double quotes
➔ $newVar = “$string1 hihi!” //replaces $string1 with its value.
➔ “Double quotes” = variable replacement
➔ 'Single quotes' = literal string
➔ That 3rd
set of quotes (`???`) = some other use
➔ function generateThumbnail($sourceImg, $destImg){ }
PHP ExamplesPHP Examples
MySQL & PHP, presented by David
Sands
11
Some MySQL + PHP UsesSome MySQL + PHP Uses
MySQL & PHP, presented by David
Sands
12
➔ Managing database from the web. Phymyadmin is a commonly used
remote database management system via a PHP interface.
➔ User places buy order on your website, and info is stored in DB.
➔ Progressively build a SQL Query string.
➔ PHP can blend with anything else on an HTML webpage, and even
dynamically generate more web code.
➔ Make and test your own website / program.
PhpBBPhpBB
MySQL & PHP, presented by David
Sands
13
PhpMyAdminPhpMyAdmin
MySQL & PHP, presented by David
Sands
14
MySQL + PHPMySQL + PHP
MySQL & PHP, presented by David
Sands
15
Need a web server that connects to a local or remote Database?
No problem!
Host most likely “localhost”.
To perform SQL commands, try this php function...
$sql = mysql_query(“SELECT * FROM myTable);
Just like with Java and its JDBC.
There is a way to iterate through the resulting bag.
List all query results Ex.List all query results Ex.
MySQL & PHP, presented by David
Sands
16
PHP Control StructurePHP Control Structure
Ex.Ex.
MySQL & PHP, presented by David
Sands
17
PHP is much like C, Java, or Javascript in some ways.
This will print 0123456789
Form Post Ex. (1 of 2)Form Post Ex. (1 of 2)
MySQL & PHP, presented by David
Sands
18
• Test.php is purely HTML.
• Form's POST action sends the object names to PHP file.
• PHP file extracts them with array $_POST[].
Form Post Ex. (2 of 2)Form Post Ex. (2 of 2)
MySQL & PHP, presented by David
Sands
19
How do I get PHP or MySQL?How do I get PHP or MySQL?
MySQL & PHP, presented by David
Sands
20
Mysql.com (100 MB)
php.net (for reference)
Some web server, like Apache or Wampserver will work.
For the examples, I used Wampserver (wampserver.com) (16 MB)
1. Installed MySQL
2. created some new tables with mysql
3. installed Wampserver
4. make .PHP files and put them in the www folder
5. Go to http://localhost/my.php
6. test your code.
MySQL-PHP ConclusionMySQL-PHP Conclusion
MySQL & PHP, presented by David
Sands
21
➔ MySQL is open-source and PHP is open-library.
➔ MySQL and PHP work well together.
➔ Free. Fairly simple and familiar to program with.
➔ MySQL is fast enough, but PHP is fairly slow.
➔ Many real-world applications on-line or even in a local network.
➔ If you are sick of MySQL command line, go get a web server with
PhpMyAdmin.
ThankThank You !!!You !!!
For More Information click below link:
Follow Us on:
http://vibranttechnologies.co.in/php-classes-in-mumbai.html

More Related Content

What's hot

Using Perl Stored Procedures for MariaDB
Using Perl Stored Procedures for MariaDBUsing Perl Stored Procedures for MariaDB
Using Perl Stored Procedures for MariaDB
Antony T Curtis
 
My sql administration
My sql administrationMy sql administration
My sql administration
Mohd yasin Karim
 
Introduction to MongoDB with PHP
Introduction to MongoDB with PHPIntroduction to MongoDB with PHP
Introduction to MongoDB with PHP
fwso
 
PostgreSQL Database Slides
PostgreSQL Database SlidesPostgreSQL Database Slides
PostgreSQL Database Slides
metsarin
 
4.3 MySQL + PHP
4.3 MySQL + PHP4.3 MySQL + PHP
4.3 MySQL + PHP
Jalpesh Vasa
 
My SQL 101
My SQL 101My SQL 101
My SQL 101
Dave Stokes
 
Perl Programming - 04 Programming Database
Perl Programming - 04 Programming DatabasePerl Programming - 04 Programming Database
Perl Programming - 04 Programming Database
Danairat Thanabodithammachari
 
Dc kyiv2010 jun_08
Dc kyiv2010 jun_08Dc kyiv2010 jun_08
Dc kyiv2010 jun_08
Andrii Podanenko
 
A brief introduction to PostgreSQL
A brief introduction to PostgreSQLA brief introduction to PostgreSQL
A brief introduction to PostgreSQL
Vu Hung Nguyen
 
Common schema my sql uc 2012
Common schema   my sql uc 2012Common schema   my sql uc 2012
Common schema my sql uc 2012Roland Bouman
 
Drupal 8 Theme System: The Backend of Frontend
Drupal 8 Theme System: The Backend of FrontendDrupal 8 Theme System: The Backend of Frontend
Drupal 8 Theme System: The Backend of Frontend
Acquia
 
MySQL Guide for Beginners
MySQL Guide for BeginnersMySQL Guide for Beginners
MySQL Guide for Beginners
Dainis Graveris
 
CQL performance with Apache Cassandra 3.0 (Aaron Morton, The Last Pickle) | C...
CQL performance with Apache Cassandra 3.0 (Aaron Morton, The Last Pickle) | C...CQL performance with Apache Cassandra 3.0 (Aaron Morton, The Last Pickle) | C...
CQL performance with Apache Cassandra 3.0 (Aaron Morton, The Last Pickle) | C...
DataStax
 
phptek13 - Caching and tuning fun tutorial
phptek13 - Caching and tuning fun tutorialphptek13 - Caching and tuning fun tutorial
phptek13 - Caching and tuning fun tutorial
Wim Godden
 
MYSQLCLONE Introduction
MYSQLCLONE IntroductionMYSQLCLONE Introduction
MYSQLCLONE Introduction
Zhaoyang Wang
 
PostgreSQL- An Introduction
PostgreSQL- An IntroductionPostgreSQL- An Introduction
PostgreSQL- An Introduction
Smita Prasad
 
Discover the Power of the NoSQL + SQL with MySQL
Discover the Power of the NoSQL + SQL with MySQLDiscover the Power of the NoSQL + SQL with MySQL
Discover the Power of the NoSQL + SQL with MySQL
Dave Stokes
 
Getting Started with PL/Proxy
Getting Started with PL/ProxyGetting Started with PL/Proxy
Getting Started with PL/Proxy
Peter Eisentraut
 
Riak Meetup Stockholm 1/11/2012
Riak Meetup Stockholm 1/11/2012Riak Meetup Stockholm 1/11/2012
Riak Meetup Stockholm 1/11/2012Bip Thelin
 

What's hot (20)

Using Perl Stored Procedures for MariaDB
Using Perl Stored Procedures for MariaDBUsing Perl Stored Procedures for MariaDB
Using Perl Stored Procedures for MariaDB
 
My sql administration
My sql administrationMy sql administration
My sql administration
 
Introduction to MongoDB with PHP
Introduction to MongoDB with PHPIntroduction to MongoDB with PHP
Introduction to MongoDB with PHP
 
PostgreSQL Database Slides
PostgreSQL Database SlidesPostgreSQL Database Slides
PostgreSQL Database Slides
 
Postgre sql unleashed
Postgre sql unleashedPostgre sql unleashed
Postgre sql unleashed
 
4.3 MySQL + PHP
4.3 MySQL + PHP4.3 MySQL + PHP
4.3 MySQL + PHP
 
My SQL 101
My SQL 101My SQL 101
My SQL 101
 
Perl Programming - 04 Programming Database
Perl Programming - 04 Programming DatabasePerl Programming - 04 Programming Database
Perl Programming - 04 Programming Database
 
Dc kyiv2010 jun_08
Dc kyiv2010 jun_08Dc kyiv2010 jun_08
Dc kyiv2010 jun_08
 
A brief introduction to PostgreSQL
A brief introduction to PostgreSQLA brief introduction to PostgreSQL
A brief introduction to PostgreSQL
 
Common schema my sql uc 2012
Common schema   my sql uc 2012Common schema   my sql uc 2012
Common schema my sql uc 2012
 
Drupal 8 Theme System: The Backend of Frontend
Drupal 8 Theme System: The Backend of FrontendDrupal 8 Theme System: The Backend of Frontend
Drupal 8 Theme System: The Backend of Frontend
 
MySQL Guide for Beginners
MySQL Guide for BeginnersMySQL Guide for Beginners
MySQL Guide for Beginners
 
CQL performance with Apache Cassandra 3.0 (Aaron Morton, The Last Pickle) | C...
CQL performance with Apache Cassandra 3.0 (Aaron Morton, The Last Pickle) | C...CQL performance with Apache Cassandra 3.0 (Aaron Morton, The Last Pickle) | C...
CQL performance with Apache Cassandra 3.0 (Aaron Morton, The Last Pickle) | C...
 
phptek13 - Caching and tuning fun tutorial
phptek13 - Caching and tuning fun tutorialphptek13 - Caching and tuning fun tutorial
phptek13 - Caching and tuning fun tutorial
 
MYSQLCLONE Introduction
MYSQLCLONE IntroductionMYSQLCLONE Introduction
MYSQLCLONE Introduction
 
PostgreSQL- An Introduction
PostgreSQL- An IntroductionPostgreSQL- An Introduction
PostgreSQL- An Introduction
 
Discover the Power of the NoSQL + SQL with MySQL
Discover the Power of the NoSQL + SQL with MySQLDiscover the Power of the NoSQL + SQL with MySQL
Discover the Power of the NoSQL + SQL with MySQL
 
Getting Started with PL/Proxy
Getting Started with PL/ProxyGetting Started with PL/Proxy
Getting Started with PL/Proxy
 
Riak Meetup Stockholm 1/11/2012
Riak Meetup Stockholm 1/11/2012Riak Meetup Stockholm 1/11/2012
Riak Meetup Stockholm 1/11/2012
 

Viewers also liked

HTML5 workshop, part 2
HTML5 workshop, part 2HTML5 workshop, part 2
HTML5 workshop, part 2
Robert Nyman
 
HTML5 workshop, part 1
HTML5 workshop, part 1HTML5 workshop, part 1
HTML5 workshop, part 1
Robert Nyman
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
Neha Sharma
 

Viewers also liked (6)

HTML5 workshop, part 2
HTML5 workshop, part 2HTML5 workshop, part 2
HTML5 workshop, part 2
 
HTML5 Workshop
HTML5 WorkshopHTML5 Workshop
HTML5 Workshop
 
Html5 by gis tec
Html5 by gis tecHtml5 by gis tec
Html5 by gis tec
 
HTML5 workshop, part 1
HTML5 workshop, part 1HTML5 workshop, part 1
HTML5 workshop, part 1
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
HTML 5
HTML 5HTML 5
HTML 5
 

Similar to PHP - Intriduction to MySQL And PHP

Introduction to PHP 5.3
Introduction to PHP 5.3Introduction to PHP 5.3
Introduction to PHP 5.3guestcc91d4
 
Starting with PHP and Web devepolment
Starting with PHP and Web devepolmentStarting with PHP and Web devepolment
Starting with PHP and Web devepolment
Rajib Ahmed
 
RMySQL Tutorial For Beginners
RMySQL Tutorial For BeginnersRMySQL Tutorial For Beginners
RMySQL Tutorial For Beginners
Rsquared Academy
 
MySQL Presentation
MySQL PresentationMySQL Presentation
MySQL Presentation
Manish Bothra
 
20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shell20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shell
Ivan Ma
 
MySQL For Oracle DBA's and Developers
MySQL For Oracle DBA's and DevelopersMySQL For Oracle DBA's and Developers
MySQL For Oracle DBA's and Developers
Ronald Bradford
 
Charla EHU Noviembre 2014 - Desarrollo Web
Charla EHU Noviembre 2014 - Desarrollo WebCharla EHU Noviembre 2014 - Desarrollo Web
Charla EHU Noviembre 2014 - Desarrollo Web
Mikel Torres Ugarte
 
Php &amp; my sql - how do pdo, mysq-li, and x devapi do what they do
Php &amp; my sql  - how do pdo, mysq-li, and x devapi do what they doPhp &amp; my sql  - how do pdo, mysq-li, and x devapi do what they do
Php &amp; my sql - how do pdo, mysq-li, and x devapi do what they do
Dave Stokes
 
My sql with querys
My sql with querysMy sql with querys
My sql with querysNIRMAL FELIX
 
Mysql database
Mysql databaseMysql database
Mysql database
Arshikhan08
 
Php basics
Php basicsPhp basics
Php basics
Egerton University
 
JavaScript and Friends August 20th, 20201 -- MySQL Shell and JavaScript
JavaScript and Friends August 20th, 20201 -- MySQL Shell and JavaScriptJavaScript and Friends August 20th, 20201 -- MySQL Shell and JavaScript
JavaScript and Friends August 20th, 20201 -- MySQL Shell and JavaScript
Dave Stokes
 
SQLMAP Tool Usage - A Heads Up
SQLMAP Tool Usage - A  Heads UpSQLMAP Tool Usage - A  Heads Up
SQLMAP Tool Usage - A Heads Up
Mindfire Solutions
 
Squeak DBX
Squeak DBXSqueak DBX
Squeak DBX
ESUG
 

Similar to PHP - Intriduction to MySQL And PHP (20)

Introduction to PHP 5.3
Introduction to PHP 5.3Introduction to PHP 5.3
Introduction to PHP 5.3
 
Starting with PHP and Web devepolment
Starting with PHP and Web devepolmentStarting with PHP and Web devepolment
Starting with PHP and Web devepolment
 
phptut4
phptut4phptut4
phptut4
 
phptut4
phptut4phptut4
phptut4
 
RMySQL Tutorial For Beginners
RMySQL Tutorial For BeginnersRMySQL Tutorial For Beginners
RMySQL Tutorial For Beginners
 
MySQL Presentation
MySQL PresentationMySQL Presentation
MySQL Presentation
 
Php summary
Php summaryPhp summary
Php summary
 
20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shell20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shell
 
MySQL For Oracle DBA's and Developers
MySQL For Oracle DBA's and DevelopersMySQL For Oracle DBA's and Developers
MySQL For Oracle DBA's and Developers
 
Charla EHU Noviembre 2014 - Desarrollo Web
Charla EHU Noviembre 2014 - Desarrollo WebCharla EHU Noviembre 2014 - Desarrollo Web
Charla EHU Noviembre 2014 - Desarrollo Web
 
Php &amp; my sql - how do pdo, mysq-li, and x devapi do what they do
Php &amp; my sql  - how do pdo, mysq-li, and x devapi do what they doPhp &amp; my sql  - how do pdo, mysq-li, and x devapi do what they do
Php &amp; my sql - how do pdo, mysq-li, and x devapi do what they do
 
My sql with querys
My sql with querysMy sql with querys
My sql with querys
 
Mysql database
Mysql databaseMysql database
Mysql database
 
Php basics
Php basicsPhp basics
Php basics
 
JavaScript and Friends August 20th, 20201 -- MySQL Shell and JavaScript
JavaScript and Friends August 20th, 20201 -- MySQL Shell and JavaScriptJavaScript and Friends August 20th, 20201 -- MySQL Shell and JavaScript
JavaScript and Friends August 20th, 20201 -- MySQL Shell and JavaScript
 
Sah
SahSah
Sah
 
My sql.ppt
My sql.pptMy sql.ppt
My sql.ppt
 
SQLMAP Tool Usage - A Heads Up
SQLMAP Tool Usage - A  Heads UpSQLMAP Tool Usage - A  Heads Up
SQLMAP Tool Usage - A Heads Up
 
Raj mysql
Raj mysqlRaj mysql
Raj mysql
 
Squeak DBX
Squeak DBXSqueak DBX
Squeak DBX
 

More from Vibrant Technologies & Computers

Buisness analyst business analysis overview ppt 5
Buisness analyst business analysis overview ppt 5Buisness analyst business analysis overview ppt 5
Buisness analyst business analysis overview ppt 5
Vibrant Technologies & Computers
 
SQL Introduction to displaying data from multiple tables
SQL Introduction to displaying data from multiple tables  SQL Introduction to displaying data from multiple tables
SQL Introduction to displaying data from multiple tables
Vibrant Technologies & Computers
 
SQL- Introduction to MySQL
SQL- Introduction to MySQLSQL- Introduction to MySQL
SQL- Introduction to MySQL
Vibrant Technologies & Computers
 
SQL- Introduction to SQL database
SQL- Introduction to SQL database SQL- Introduction to SQL database
SQL- Introduction to SQL database
Vibrant Technologies & Computers
 
ITIL - introduction to ITIL
ITIL - introduction to ITILITIL - introduction to ITIL
ITIL - introduction to ITIL
Vibrant Technologies & Computers
 
Salesforce - Introduction to Security & Access
Salesforce -  Introduction to Security & Access Salesforce -  Introduction to Security & Access
Salesforce - Introduction to Security & Access
Vibrant Technologies & Computers
 
Data ware housing- Introduction to olap .
Data ware housing- Introduction to  olap .Data ware housing- Introduction to  olap .
Data ware housing- Introduction to olap .
Vibrant Technologies & Computers
 
Data ware housing - Introduction to data ware housing process.
Data ware housing - Introduction to data ware housing process.Data ware housing - Introduction to data ware housing process.
Data ware housing - Introduction to data ware housing process.
Vibrant Technologies & Computers
 
Data ware housing- Introduction to data ware housing
Data ware housing- Introduction to data ware housingData ware housing- Introduction to data ware housing
Data ware housing- Introduction to data ware housing
Vibrant Technologies & Computers
 
Salesforce - classification of cloud computing
Salesforce - classification of cloud computingSalesforce - classification of cloud computing
Salesforce - classification of cloud computing
Vibrant Technologies & Computers
 
Salesforce - cloud computing fundamental
Salesforce - cloud computing fundamentalSalesforce - cloud computing fundamental
Salesforce - cloud computing fundamental
Vibrant Technologies & Computers
 
SQL- Introduction to PL/SQL
SQL- Introduction to  PL/SQLSQL- Introduction to  PL/SQL
SQL- Introduction to PL/SQL
Vibrant Technologies & Computers
 
SQL- Introduction to advanced sql concepts
SQL- Introduction to  advanced sql conceptsSQL- Introduction to  advanced sql concepts
SQL- Introduction to advanced sql concepts
Vibrant Technologies & Computers
 
SQL Inteoduction to SQL manipulating of data
SQL Inteoduction to SQL manipulating of data   SQL Inteoduction to SQL manipulating of data
SQL Inteoduction to SQL manipulating of data
Vibrant Technologies & Computers
 
SQL- Introduction to SQL Set Operations
SQL- Introduction to SQL Set OperationsSQL- Introduction to SQL Set Operations
SQL- Introduction to SQL Set Operations
Vibrant Technologies & Computers
 
Sas - Introduction to designing the data mart
Sas - Introduction to designing the data martSas - Introduction to designing the data mart
Sas - Introduction to designing the data mart
Vibrant Technologies & Computers
 
Sas - Introduction to working under change management
Sas - Introduction to working under change managementSas - Introduction to working under change management
Sas - Introduction to working under change management
Vibrant Technologies & Computers
 
SAS - overview of SAS
SAS - overview of SASSAS - overview of SAS
SAS - overview of SAS
Vibrant Technologies & Computers
 
Teradata - Architecture of Teradata
Teradata - Architecture of TeradataTeradata - Architecture of Teradata
Teradata - Architecture of Teradata
Vibrant Technologies & Computers
 
Teradata - Restoring Data
Teradata - Restoring Data Teradata - Restoring Data
Teradata - Restoring Data
Vibrant Technologies & Computers
 

More from Vibrant Technologies & Computers (20)

Buisness analyst business analysis overview ppt 5
Buisness analyst business analysis overview ppt 5Buisness analyst business analysis overview ppt 5
Buisness analyst business analysis overview ppt 5
 
SQL Introduction to displaying data from multiple tables
SQL Introduction to displaying data from multiple tables  SQL Introduction to displaying data from multiple tables
SQL Introduction to displaying data from multiple tables
 
SQL- Introduction to MySQL
SQL- Introduction to MySQLSQL- Introduction to MySQL
SQL- Introduction to MySQL
 
SQL- Introduction to SQL database
SQL- Introduction to SQL database SQL- Introduction to SQL database
SQL- Introduction to SQL database
 
ITIL - introduction to ITIL
ITIL - introduction to ITILITIL - introduction to ITIL
ITIL - introduction to ITIL
 
Salesforce - Introduction to Security & Access
Salesforce -  Introduction to Security & Access Salesforce -  Introduction to Security & Access
Salesforce - Introduction to Security & Access
 
Data ware housing- Introduction to olap .
Data ware housing- Introduction to  olap .Data ware housing- Introduction to  olap .
Data ware housing- Introduction to olap .
 
Data ware housing - Introduction to data ware housing process.
Data ware housing - Introduction to data ware housing process.Data ware housing - Introduction to data ware housing process.
Data ware housing - Introduction to data ware housing process.
 
Data ware housing- Introduction to data ware housing
Data ware housing- Introduction to data ware housingData ware housing- Introduction to data ware housing
Data ware housing- Introduction to data ware housing
 
Salesforce - classification of cloud computing
Salesforce - classification of cloud computingSalesforce - classification of cloud computing
Salesforce - classification of cloud computing
 
Salesforce - cloud computing fundamental
Salesforce - cloud computing fundamentalSalesforce - cloud computing fundamental
Salesforce - cloud computing fundamental
 
SQL- Introduction to PL/SQL
SQL- Introduction to  PL/SQLSQL- Introduction to  PL/SQL
SQL- Introduction to PL/SQL
 
SQL- Introduction to advanced sql concepts
SQL- Introduction to  advanced sql conceptsSQL- Introduction to  advanced sql concepts
SQL- Introduction to advanced sql concepts
 
SQL Inteoduction to SQL manipulating of data
SQL Inteoduction to SQL manipulating of data   SQL Inteoduction to SQL manipulating of data
SQL Inteoduction to SQL manipulating of data
 
SQL- Introduction to SQL Set Operations
SQL- Introduction to SQL Set OperationsSQL- Introduction to SQL Set Operations
SQL- Introduction to SQL Set Operations
 
Sas - Introduction to designing the data mart
Sas - Introduction to designing the data martSas - Introduction to designing the data mart
Sas - Introduction to designing the data mart
 
Sas - Introduction to working under change management
Sas - Introduction to working under change managementSas - Introduction to working under change management
Sas - Introduction to working under change management
 
SAS - overview of SAS
SAS - overview of SASSAS - overview of SAS
SAS - overview of SAS
 
Teradata - Architecture of Teradata
Teradata - Architecture of TeradataTeradata - Architecture of Teradata
Teradata - Architecture of Teradata
 
Teradata - Restoring Data
Teradata - Restoring Data Teradata - Restoring Data
Teradata - Restoring Data
 

Recently uploaded

Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 

Recently uploaded (20)

Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 

PHP - Intriduction to MySQL And PHP

  • 1.
  • 3. History of SQLHistory of SQL MySQL & PHP, presented by David Sands 3 1974 - First version of SQL developed by Donald Chamberlin and Raymond Boyce at IBM (SEQUEL). Used to manipulate and retrieve data in their database. 1986 - American National Standards Institute (ANSI) standardizes SQL-86. 1999 – SQL3 supports new features like procedural & control-of-flow statements, triggers, and regular expressions. ….. 2008 – SQL2008 - still modifying the language to date. Popular SQL suppliers today MySQL, Microsoft SQL Server, IBM DB2, Oracle 11g, PostgreSQLSQL
  • 4. Basic SQL SyntaxBasic SQL Syntax MySQL & PHP, presented by David Sands 4 ➔ Data Definition Language (DDL) • CREATE TABLE / DATABASE / VIEW / etc..... • ALTER ... • DROP ... ➔ Data Manipulation Language (DML) • SELECT ... FROM / INTO … WHERE ... • INSERT INTO ... VALUES ... • UPDATE … SET … WHERE ... • DELETE FROM … WHERE ...
  • 5. Intro to MySQLIntro to MySQL MySQL & PHP, presented by David Sands 5 ➔ Released 23 May 1995. ➔ 11+ Million web servers using MySQL ➔ Similar, but not exactly same syntax as IBM DB2, Oracle 11g, etc... ➔ Open-source & free to download, under the GNU General Public License. ➔ Coded in C / C++, Yacc parser, and custom lexical analyzer.
  • 6. MySQL Tutorial (1 of 2)MySQL Tutorial (1 of 2) MySQL & PHP, presented by David Sands 6 ➔ Following from MySQL 5.1 Manual (3.3 Creating and using a database) ➔ For Command Prompt usage, follow these steps to use a database. Enter password: XXXXX Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 4 Server version: 5.1.31-community MySQL Community Server (GPL) Type 'help;' or 'h' for help. Type 'c' to clear the buffer. mysql> SHOW DATABASES; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | test | +--------------------+ 3 rows in set (0.00 sec) mysql> USE TEST; Database changed ➔ You can now perform DML & DDL operations!
  • 7. MySQL Tutorial (2 of 2)MySQL Tutorial (2 of 2) MySQL & PHP, presented by David Sands 7 mysql> CREATE TABLE myTest (time DATE, note VARCHAR(10), id INT); Query OK, 0 rows affected (0.11 sec) mysql> DESCRIBE myTest; +-------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+-------------+------+-----+---------+-------+ | time | date | YES | | NULL | | | note | varchar(10) | YES | | NULL | | | id | int(11) | YES | | NULL | | +-------+-------------+------+-----+---------+-------+ 3 rows in set (0.05 sec) mysql> INSERT INTO myTest VALUES (NULL, "hello", 3); Query OK, 1 row affected (0.05 sec) mysql> SELECT * FROM myTest; +------+-------+------+ | time | note | id | +------+-------+------+ | NULL | hello | 3 | +------+-------+------+ 1 row in set (0.01 sec) mysql>
  • 8. History of PHPHistory of PHP MySQL & PHP, presented by David Sands 8 1994 - Rasmus Lerdorf wrote Common Gateway Interface (CGI) Binaries. 1995 - Personal Home Page Tools (PHP Tools) formed. 1997-8 - Zeev Suraski & Andi Gutmans wrote PHP parser. Their PHP3 became the PHP: Hypertext Preprocessor. To 2008 - Various improvements & bug fixes. ➔ Old versions of PHP – Code not compiled. Only interpreted and run. ➔ After PHP4, Parser compiles input to produce bytecode for Zend Engine processing.
  • 9. Intro to PHPIntro to PHP MySQL & PHP, presented by David Sands 9 ➔ PHP file runs on web server, inputs PHP code, compiles to bytecode, outputs Web Pages. ➔ Creates Dynamic Web Pages, using Server Side Scripting. (like .asp, .jsp, perl). Clients “Run” these web pages when visited. ➔ Similar programming structure / syntax as C or Javascript. Other “Tools” included in PHP releases like ImageJPEG($im,$destpic, $jpeg_thumb_quality); ➔ HTML (markup language) usually used along with PHP.
  • 10. PHP SyntaxPHP Syntax MySQL & PHP, presented by David Sands 10 ➔ <?php PHP code here ?> ➔ $variable //automatic type detection on assignment. ➔ $ is escape character for variables within double quotes ➔ $newVar = “$string1 hihi!” //replaces $string1 with its value. ➔ “Double quotes” = variable replacement ➔ 'Single quotes' = literal string ➔ That 3rd set of quotes (`???`) = some other use ➔ function generateThumbnail($sourceImg, $destImg){ }
  • 11. PHP ExamplesPHP Examples MySQL & PHP, presented by David Sands 11
  • 12. Some MySQL + PHP UsesSome MySQL + PHP Uses MySQL & PHP, presented by David Sands 12 ➔ Managing database from the web. Phymyadmin is a commonly used remote database management system via a PHP interface. ➔ User places buy order on your website, and info is stored in DB. ➔ Progressively build a SQL Query string. ➔ PHP can blend with anything else on an HTML webpage, and even dynamically generate more web code. ➔ Make and test your own website / program.
  • 13. PhpBBPhpBB MySQL & PHP, presented by David Sands 13
  • 14. PhpMyAdminPhpMyAdmin MySQL & PHP, presented by David Sands 14
  • 15. MySQL + PHPMySQL + PHP MySQL & PHP, presented by David Sands 15 Need a web server that connects to a local or remote Database? No problem! Host most likely “localhost”. To perform SQL commands, try this php function... $sql = mysql_query(“SELECT * FROM myTable); Just like with Java and its JDBC. There is a way to iterate through the resulting bag.
  • 16. List all query results Ex.List all query results Ex. MySQL & PHP, presented by David Sands 16
  • 17. PHP Control StructurePHP Control Structure Ex.Ex. MySQL & PHP, presented by David Sands 17 PHP is much like C, Java, or Javascript in some ways. This will print 0123456789
  • 18. Form Post Ex. (1 of 2)Form Post Ex. (1 of 2) MySQL & PHP, presented by David Sands 18 • Test.php is purely HTML. • Form's POST action sends the object names to PHP file. • PHP file extracts them with array $_POST[].
  • 19. Form Post Ex. (2 of 2)Form Post Ex. (2 of 2) MySQL & PHP, presented by David Sands 19
  • 20. How do I get PHP or MySQL?How do I get PHP or MySQL? MySQL & PHP, presented by David Sands 20 Mysql.com (100 MB) php.net (for reference) Some web server, like Apache or Wampserver will work. For the examples, I used Wampserver (wampserver.com) (16 MB) 1. Installed MySQL 2. created some new tables with mysql 3. installed Wampserver 4. make .PHP files and put them in the www folder 5. Go to http://localhost/my.php 6. test your code.
  • 21. MySQL-PHP ConclusionMySQL-PHP Conclusion MySQL & PHP, presented by David Sands 21 ➔ MySQL is open-source and PHP is open-library. ➔ MySQL and PHP work well together. ➔ Free. Fairly simple and familiar to program with. ➔ MySQL is fast enough, but PHP is fairly slow. ➔ Many real-world applications on-line or even in a local network. ➔ If you are sick of MySQL command line, go get a web server with PhpMyAdmin.
  • 22. ThankThank You !!!You !!! For More Information click below link: Follow Us on: http://vibranttechnologies.co.in/php-classes-in-mumbai.html