SlideShare a Scribd company logo
Introduction to
MySQL & PHP
By
Vibrant TechnologiesVibrant Technologies
& Computers& Computers
By
Vibrant TechnologiesVibrant Technologies
& Computers& Computers
MySQL & PHP, presented by Vibrant
Technologies & Computers
3
History of SQL
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
MySQL & PHP, presented by Vibrant
Technologies & Computers
4
Basic SQL Syntax
➔ 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 ...
MySQL & PHP, presented by Vibrant
Technologies & Computers
5
Intro to PHP MySQL
➔ 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 & PHP, presented by Vibrant
Technologies & Computers
6
MySQL Tutorial (1 of 2)
➔ 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 & PHP, presented by Vibrant
Technologies & Computers
7
MySQL Tutorial (2 of 2)
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>
MySQL & PHP, presented by Vibrant
Technologies & Computers
8
History of PHP
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.
MySQL & PHP, presented by Vibrant
Technologies & Computers
9
Intro to PHP
➔ 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.
MySQL & PHP, presented by Vibrant
Technologies & Computers
10
PHP Syntax
➔ <?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){ }
MySQL & PHP, presented by Vibrant
Technologies & Computers
11
PHP Examples
MySQL & PHP, presented by Vibrant
Technologies & Computers
12
Some MySQL + PHP Uses
➔ 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.
MySQL & PHP, presented by Vibrant
Technologies & Computers
13
PhpBB
MySQL & PHP, presented by Vibrant
Technologies & Computers
14
PhpMyAdmin
MySQL & PHP, presented by Vibrant
Technologies & Computers
15
MySQL + PHP
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.
MySQL & PHP, presented by Vibrant
Technologies & Computers
16
List all query results Ex.
MySQL & PHP, presented by Vibrant
Technologies & Computers
17
PHP Control Structure Ex.
PHP is much like C, Java, or Javascript in some ways.
This will print 0123456789
MySQL & PHP, presented by Vibrant
Technologies & Computers
18
Form Post Ex. (1 of 2)
• Test.php is purely HTML.
• Form's POST action sends the object names to PHP file.
• PHP file extracts them with array $_POST[].
MySQL & PHP, presented by Vibrant
Technologies & Computers
19
Form Post Ex. (2 of 2)
MySQL & PHP, presented by Vibrant
Technologies & Computers
20
How do I get PHP or MySQL?
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, presented by Vibrant
Technologies & Computers
21
MySQL-PHP Conclusion
➔ 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.
Thank You!!Thank You!!

More Related Content

What's hot

Php database connectivity
Php database connectivityPhp database connectivity
External Language Stored Procedures for MySQL
External Language Stored Procedures for MySQLExternal Language Stored Procedures for MySQL
External Language Stored Procedures for MySQLAntony T Curtis
 
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
 
PDO Basics - PHPMelb 2014
PDO Basics - PHPMelb 2014PDO Basics - PHPMelb 2014
PDO Basics - PHPMelb 2014
andrewdotcom
 
4.3 MySQL + PHP
4.3 MySQL + PHP4.3 MySQL + PHP
4.3 MySQL + PHP
Jalpesh Vasa
 
Cake PHP 3 Presentaion
Cake PHP 3 PresentaionCake PHP 3 Presentaion
Cake PHP 3 Presentaion
glslarmenta
 
Php MySql For Beginners
Php MySql For BeginnersPhp MySql For Beginners
Php MySql For Beginners
Priti Solanki
 
PHP - PDO Objects
PHP - PDO ObjectsPHP - PDO Objects
PHP - PDO Objects
AJINKYA N
 
Sqlmap
SqlmapSqlmap
Database Connectivity in PHP
Database Connectivity in PHPDatabase Connectivity in PHP
Database Connectivity in PHP
Taha Malampatti
 
PHP - Getting good with MySQL part II
 PHP - Getting good with MySQL part II PHP - Getting good with MySQL part II
PHP - Getting good with MySQL part II
Firdaus Adib
 
Adodb Pdo Presentation
Adodb Pdo PresentationAdodb Pdo Presentation
Adodb Pdo Presentation
Tom Rogers
 
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
 
MySQL
MySQLMySQL
Sqlmap
SqlmapSqlmap

What's hot (20)

PHP and MySQL
PHP and MySQLPHP and MySQL
PHP and MySQL
 
Php database connectivity
Php database connectivityPhp database connectivity
Php database connectivity
 
External Language Stored Procedures for MySQL
External Language Stored Procedures for MySQLExternal Language Stored Procedures for MySQL
External Language Stored Procedures for MySQL
 
Using Perl Stored Procedures for MariaDB
Using Perl Stored Procedures for MariaDBUsing Perl Stored Procedures for MariaDB
Using Perl Stored Procedures for MariaDB
 
PDO Basics - PHPMelb 2014
PDO Basics - PHPMelb 2014PDO Basics - PHPMelb 2014
PDO Basics - PHPMelb 2014
 
4.3 MySQL + PHP
4.3 MySQL + PHP4.3 MySQL + PHP
4.3 MySQL + PHP
 
Cake PHP 3 Presentaion
Cake PHP 3 PresentaionCake PHP 3 Presentaion
Cake PHP 3 Presentaion
 
Php MySql For Beginners
Php MySql For BeginnersPhp MySql For Beginners
Php MySql For Beginners
 
PHP - PDO Objects
PHP - PDO ObjectsPHP - PDO Objects
PHP - PDO Objects
 
Introduction to php database connectivity
Introduction to php  database connectivityIntroduction to php  database connectivity
Introduction to php database connectivity
 
lab56_db
lab56_dblab56_db
lab56_db
 
Sqlmap
SqlmapSqlmap
Sqlmap
 
Database Connectivity in PHP
Database Connectivity in PHPDatabase Connectivity in PHP
Database Connectivity in PHP
 
PHP - Getting good with MySQL part II
 PHP - Getting good with MySQL part II PHP - Getting good with MySQL part II
PHP - Getting good with MySQL part II
 
Adodb Pdo Presentation
Adodb Pdo PresentationAdodb Pdo Presentation
Adodb Pdo Presentation
 
Sah
SahSah
Sah
 
SQLMAP Tool Usage - A Heads Up
SQLMAP Tool Usage - A  Heads UpSQLMAP Tool Usage - A  Heads Up
SQLMAP Tool Usage - A Heads Up
 
MySQL
MySQLMySQL
MySQL
 
Mysql
MysqlMysql
Mysql
 
Sqlmap
SqlmapSqlmap
Sqlmap
 

Viewers also liked

Afghanistan
AfghanistanAfghanistan
Afghanistansh3raz
 
System and law of poland
System and law of polandSystem and law of poland
System and law of poland
Elpida Adalopoulou
 
Food art
Food artFood art
Dubai Food Carnival 2015
Dubai Food Carnival 2015Dubai Food Carnival 2015
Dubai Food Carnival 2015Michael Eberle
 
Pizza And Painting Food As Art
Pizza And Painting Food As ArtPizza And Painting Food As Art
Pizza And Painting Food As ArtWilliam Spaulding
 
Food Art :-)
Food Art :-)Food Art :-)
Food Art :-)Sylvi O.
 
Food Art
Food ArtFood Art
Food Art
Food ArtFood Art
Food Art
thenickwhite
 
Food art power point
Food art power pointFood art power point
Food art power pointmec3q
 
Food art
Food artFood art
Food art
FoodRhythms
 
Beautiful Greece
Beautiful GreeceBeautiful Greece
Beautiful GreeceLavennder M
 
Art From Food
Art From FoodArt From Food
Art From Food
Mihex
 
Food art
Food artFood art
Food artlys167
 
Food art
Food artFood art
Food art
Misato Morino
 
CLAES OLDENBURG DES 104 PRESENTATION
CLAES OLDENBURG DES 104 PRESENTATION CLAES OLDENBURG DES 104 PRESENTATION
CLAES OLDENBURG DES 104 PRESENTATION
Bec Lazenby
 
Sculptures with fruits
Sculptures with fruitsSculptures with fruits
Sculptures with fruits
Lavennder M
 

Viewers also liked (20)

Afghanistan
AfghanistanAfghanistan
Afghanistan
 
System and law of poland
System and law of polandSystem and law of poland
System and law of poland
 
Food art
Food artFood art
Food art
 
Dubai Food Carnival 2015
Dubai Food Carnival 2015Dubai Food Carnival 2015
Dubai Food Carnival 2015
 
Pizza And Painting Food As Art
Pizza And Painting Food As ArtPizza And Painting Food As Art
Pizza And Painting Food As Art
 
Food Art :-)
Food Art :-)Food Art :-)
Food Art :-)
 
Edward Hopper
Edward HopperEdward Hopper
Edward Hopper
 
Food Art
Food ArtFood Art
Food Art
 
Food Art
Food ArtFood Art
Food Art
 
Food art power point
Food art power pointFood art power point
Food art power point
 
Food Art
Food ArtFood Art
Food Art
 
Food art
Food artFood art
Food art
 
Beautiful Greece
Beautiful GreeceBeautiful Greece
Beautiful Greece
 
Art From Food
Art From FoodArt From Food
Art From Food
 
Food art
Food artFood art
Food art
 
Food art
Food artFood art
Food art
 
CLAES OLDENBURG DES 104 PRESENTATION
CLAES OLDENBURG DES 104 PRESENTATION CLAES OLDENBURG DES 104 PRESENTATION
CLAES OLDENBURG DES 104 PRESENTATION
 
Carl Warner Food Art
Carl Warner Food ArtCarl Warner Food Art
Carl Warner Food Art
 
Claes oldenburg
Claes oldenburgClaes oldenburg
Claes oldenburg
 
Sculptures with fruits
Sculptures with fruitsSculptures with fruits
Sculptures with fruits
 

Similar to Php classes in mumbai

Using Ruby on Rails with legacy Oracle databases
Using Ruby on Rails with legacy Oracle databasesUsing Ruby on Rails with legacy Oracle databases
Using Ruby on Rails with legacy Oracle databasesRaimonds Simanovskis
 
Introduction to PHP 5.3
Introduction to PHP 5.3Introduction to PHP 5.3
Introduction to PHP 5.3guestcc91d4
 
Tutorial On Database Management System
Tutorial On Database Management SystemTutorial On Database Management System
Tutorial On Database Management System
psathishcs
 
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
 
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
 
Introduction to SQLite in Adobe AIR
Introduction to SQLite in Adobe AIRIntroduction to SQLite in Adobe AIR
Introduction to SQLite in Adobe AIR
Peter Elst
 
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
 
RubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - KeynoteRubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - Keynote
Dr Nic Williams
 
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 FUNCTIONS
PHP FUNCTIONSPHP FUNCTIONS
PHP FUNCTIONS
Zeeshan Ahmed
 
HTTP, JSON, JavaScript, Map&Reduce built-in to MySQL
HTTP, JSON, JavaScript, Map&Reduce built-in to MySQLHTTP, JSON, JavaScript, Map&Reduce built-in to MySQL
HTTP, JSON, JavaScript, Map&Reduce built-in to MySQL
Ulf Wendel
 
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
 
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
 

Similar to Php classes in mumbai (20)

Using Ruby on Rails with legacy Oracle databases
Using Ruby on Rails with legacy Oracle databasesUsing Ruby on Rails with legacy Oracle databases
Using Ruby on Rails with legacy Oracle databases
 
Download It
Download ItDownload It
Download It
 
Php summary
Php summaryPhp summary
Php summary
 
Introduction to PHP 5.3
Introduction to PHP 5.3Introduction to PHP 5.3
Introduction to PHP 5.3
 
Tutorial On Database Management System
Tutorial On Database Management SystemTutorial On Database Management System
Tutorial On Database Management System
 
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
 
Starting with PHP and Web devepolment
Starting with PHP and Web devepolmentStarting with PHP and Web devepolment
Starting with PHP and Web devepolment
 
Introduction to SQLite in Adobe AIR
Introduction to SQLite in Adobe AIRIntroduction to SQLite in Adobe AIR
Introduction to SQLite in Adobe AIR
 
20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shell20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shell
 
RubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - KeynoteRubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - Keynote
 
Charla EHU Noviembre 2014 - Desarrollo Web
Charla EHU Noviembre 2014 - Desarrollo WebCharla EHU Noviembre 2014 - Desarrollo Web
Charla EHU Noviembre 2014 - Desarrollo Web
 
phptut4
phptut4phptut4
phptut4
 
phptut4
phptut4phptut4
phptut4
 
Java JDBC
Java JDBCJava JDBC
Java JDBC
 
Jdbc
JdbcJdbc
Jdbc
 
PHP FUNCTIONS
PHP FUNCTIONSPHP FUNCTIONS
PHP FUNCTIONS
 
HTTP, JSON, JavaScript, Map&Reduce built-in to MySQL
HTTP, JSON, JavaScript, Map&Reduce built-in to MySQLHTTP, JSON, JavaScript, Map&Reduce built-in to MySQL
HTTP, JSON, JavaScript, Map&Reduce built-in to MySQL
 
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
 
RMySQL Tutorial For Beginners
RMySQL Tutorial For BeginnersRMySQL Tutorial For Beginners
RMySQL Tutorial For Beginners
 
MySQL Presentation
MySQL PresentationMySQL Presentation
MySQL Presentation
 

Recently uploaded

PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
ArianaBusciglio
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
Bisnar Chase Personal Injury Attorneys
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
NelTorrente
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 

Recently uploaded (20)

PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 

Php classes in mumbai

  • 1.
  • 2. Introduction to MySQL & PHP By Vibrant TechnologiesVibrant Technologies & Computers& Computers By Vibrant TechnologiesVibrant Technologies & Computers& Computers
  • 3. MySQL & PHP, presented by Vibrant Technologies & Computers 3 History of SQL 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. MySQL & PHP, presented by Vibrant Technologies & Computers 4 Basic SQL Syntax ➔ 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. MySQL & PHP, presented by Vibrant Technologies & Computers 5 Intro to PHP MySQL ➔ 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 & PHP, presented by Vibrant Technologies & Computers 6 MySQL Tutorial (1 of 2) ➔ 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 & PHP, presented by Vibrant Technologies & Computers 7 MySQL Tutorial (2 of 2) 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. MySQL & PHP, presented by Vibrant Technologies & Computers 8 History of PHP 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. MySQL & PHP, presented by Vibrant Technologies & Computers 9 Intro to PHP ➔ 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. MySQL & PHP, presented by Vibrant Technologies & Computers 10 PHP Syntax ➔ <?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. MySQL & PHP, presented by Vibrant Technologies & Computers 11 PHP Examples
  • 12. MySQL & PHP, presented by Vibrant Technologies & Computers 12 Some MySQL + PHP Uses ➔ 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. MySQL & PHP, presented by Vibrant Technologies & Computers 13 PhpBB
  • 14. MySQL & PHP, presented by Vibrant Technologies & Computers 14 PhpMyAdmin
  • 15. MySQL & PHP, presented by Vibrant Technologies & Computers 15 MySQL + PHP 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. MySQL & PHP, presented by Vibrant Technologies & Computers 16 List all query results Ex.
  • 17. MySQL & PHP, presented by Vibrant Technologies & Computers 17 PHP Control Structure Ex. PHP is much like C, Java, or Javascript in some ways. This will print 0123456789
  • 18. MySQL & PHP, presented by Vibrant Technologies & Computers 18 Form Post Ex. (1 of 2) • Test.php is purely HTML. • Form's POST action sends the object names to PHP file. • PHP file extracts them with array $_POST[].
  • 19. MySQL & PHP, presented by Vibrant Technologies & Computers 19 Form Post Ex. (2 of 2)
  • 20. MySQL & PHP, presented by Vibrant Technologies & Computers 20 How do I get PHP or MySQL? 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, presented by Vibrant Technologies & Computers 21 MySQL-PHP Conclusion ➔ 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.