SlideShare ist ein Scribd-Unternehmen logo
1 von 5
Downloaden Sie, um offline zu lesen
Connecting to MySQL
<?php
$con = mysql_connect(‘localhost’,’lampusr’,’lamppwd’);
If($con)
{
echo “Connected”;
}else{
echo “Could not connect to MySQL”;
exit();
}
?>
Closing MySQL
<?php
$con = mysql_connect(‘localhost’,’lampusr’,’lamppwd’);
If($con)
{
echo “Connected”;
// do some work with mysql
mysql_close($con);
}else{
echo “Could not connect to MySQL”;
exit();
}
?>
Executing Query - Creation
<?php
mysql_query(“create database if not exists ‘abc’”,$con);
mysql_use_db(‘abc’);
mysql_query(“create table if not exists trainee(name
varchar(30) primary key, score int(3))engine=myisam”);

?>
Executing Query - Insert
<?php
$q = “((‘Trainee1’, 20), (‘Trainee2’,’40’), (‘Trainee3,
60))”;

mysql_query(“insert into abc.trainee values $q”);
echo mysql_error();

?>


            name              score

            trainee1          20

            trainee2          40

            tainee3           60

Weitere ähnliche Inhalte

Was ist angesagt?

Pemrograman Web 8 - MySQL
Pemrograman Web 8 - MySQLPemrograman Web 8 - MySQL
Pemrograman Web 8 - MySQLNur Fadli Utomo
 
Pemrograman Web 9 - Input Form DB dan Session
Pemrograman Web 9 - Input Form DB dan SessionPemrograman Web 9 - Input Form DB dan Session
Pemrograman Web 9 - Input Form DB dan SessionNur Fadli Utomo
 
hotel managment
hotel managmenthotel managment
hotel managmentMelk Biks
 
HOW TO UPLOAD AND DISPLAY IMAGE PHP HTML SQL
HOW TO UPLOAD AND DISPLAY IMAGE PHP HTML SQLHOW TO UPLOAD AND DISPLAY IMAGE PHP HTML SQL
HOW TO UPLOAD AND DISPLAY IMAGE PHP HTML SQLmauricemuteti2015
 
WordPress Security - WordCamp Phoenix
WordPress Security - WordCamp PhoenixWordPress Security - WordCamp Phoenix
WordPress Security - WordCamp PhoenixMark Jaquith
 
London XQuery Meetup: Querying the World (Web Scraping)
London XQuery Meetup: Querying the World (Web Scraping)London XQuery Meetup: Querying the World (Web Scraping)
London XQuery Meetup: Querying the World (Web Scraping)Dennis Knochenwefel
 
Google Cloud Challenge - PHP - DevFest GDG-Cairo
Google Cloud Challenge - PHP - DevFest GDG-Cairo Google Cloud Challenge - PHP - DevFest GDG-Cairo
Google Cloud Challenge - PHP - DevFest GDG-Cairo Haitham Nabil
 
与 PHP 和 Perl 使用 MySQL 数据库
与 PHP 和 Perl 使用 MySQL 数据库与 PHP 和 Perl 使用 MySQL 数据库
与 PHP 和 Perl 使用 MySQL 数据库YUCHENG HU
 
TDC2015 Porto Alegre - Automate everything with Phing !
TDC2015 Porto Alegre - Automate everything with Phing !TDC2015 Porto Alegre - Automate everything with Phing !
TDC2015 Porto Alegre - Automate everything with Phing !Matheus Marabesi
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applicationselliando dias
 
Darkmira Tour PHP 2016 - Automatizando Tarefas com Phing
Darkmira Tour PHP 2016 - Automatizando Tarefas com PhingDarkmira Tour PHP 2016 - Automatizando Tarefas com Phing
Darkmira Tour PHP 2016 - Automatizando Tarefas com PhingMatheus Marabesi
 

Was ist angesagt? (20)

Pemrograman Web 8 - MySQL
Pemrograman Web 8 - MySQLPemrograman Web 8 - MySQL
Pemrograman Web 8 - MySQL
 
Pemrograman Web 9 - Input Form DB dan Session
Pemrograman Web 9 - Input Form DB dan SessionPemrograman Web 9 - Input Form DB dan Session
Pemrograman Web 9 - Input Form DB dan Session
 
hotel managment
hotel managmenthotel managment
hotel managment
 
Karan chanana
Karan chananaKaran chanana
Karan chanana
 
HOW TO UPLOAD AND DISPLAY IMAGE PHP HTML SQL
HOW TO UPLOAD AND DISPLAY IMAGE PHP HTML SQLHOW TO UPLOAD AND DISPLAY IMAGE PHP HTML SQL
HOW TO UPLOAD AND DISPLAY IMAGE PHP HTML SQL
 
WordPress Security - WordCamp Phoenix
WordPress Security - WordCamp PhoenixWordPress Security - WordCamp Phoenix
WordPress Security - WordCamp Phoenix
 
TerminalでTwitter
TerminalでTwitterTerminalでTwitter
TerminalでTwitter
 
Practica csv
Practica csvPractica csv
Practica csv
 
London XQuery Meetup: Querying the World (Web Scraping)
London XQuery Meetup: Querying the World (Web Scraping)London XQuery Meetup: Querying the World (Web Scraping)
London XQuery Meetup: Querying the World (Web Scraping)
 
Google Cloud Challenge - PHP - DevFest GDG-Cairo
Google Cloud Challenge - PHP - DevFest GDG-Cairo Google Cloud Challenge - PHP - DevFest GDG-Cairo
Google Cloud Challenge - PHP - DevFest GDG-Cairo
 
Tutorial
TutorialTutorial
Tutorial
 
M.php
M.phpM.php
M.php
 
与 PHP 和 Perl 使用 MySQL 数据库
与 PHP 和 Perl 使用 MySQL 数据库与 PHP 和 Perl 使用 MySQL 数据库
与 PHP 和 Perl 使用 MySQL 数据库
 
Borrados
BorradosBorrados
Borrados
 
Php talk
Php talkPhp talk
Php talk
 
Php (1)
Php (1)Php (1)
Php (1)
 
IsTrue(true)?
IsTrue(true)?IsTrue(true)?
IsTrue(true)?
 
TDC2015 Porto Alegre - Automate everything with Phing !
TDC2015 Porto Alegre - Automate everything with Phing !TDC2015 Porto Alegre - Automate everything with Phing !
TDC2015 Porto Alegre - Automate everything with Phing !
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applications
 
Darkmira Tour PHP 2016 - Automatizando Tarefas com Phing
Darkmira Tour PHP 2016 - Automatizando Tarefas com PhingDarkmira Tour PHP 2016 - Automatizando Tarefas com Phing
Darkmira Tour PHP 2016 - Automatizando Tarefas com Phing
 

Andere mochten auch

Dorchestercollection
DorchestercollectionDorchestercollection
DorchestercollectionMargaux
 
Limpeza do percurso do Corta-mato
Limpeza do percurso do Corta-matoLimpeza do percurso do Corta-mato
Limpeza do percurso do Corta-matoNunoMoreira
 
Nadie Se Cruza Por Azar
Nadie Se Cruza Por AzarNadie Se Cruza Por Azar
Nadie Se Cruza Por Azaradnmarketing
 
Global Warming By Lauraige+Soph
Global Warming By Lauraige+SophGlobal Warming By Lauraige+Soph
Global Warming By Lauraige+Sophguest13cfeb
 
Capita Selecta Multimedia Presentatie 2
Capita Selecta Multimedia Presentatie 2Capita Selecta Multimedia Presentatie 2
Capita Selecta Multimedia Presentatie 2Davy Debacker
 
Corso Slide Sloodle Italia
Corso Slide Sloodle ItaliaCorso Slide Sloodle Italia
Corso Slide Sloodle ItaliaEleonora Porta
 
TRIC High Performance Infrastructure
TRIC High Performance Infrastructure TRIC High Performance Infrastructure
TRIC High Performance Infrastructure TRIC Tools
 
Web Standards Presentation - CSS
Web Standards Presentation - CSSWeb Standards Presentation - CSS
Web Standards Presentation - CSSslandry
 
Dorchestercollection
DorchestercollectionDorchestercollection
DorchestercollectionMargaux
 
Development w ręce ludu - czyli wielki powrót twórców niezależnych w czasach ...
Development w ręce ludu - czyli wielki powrót twórców niezależnych w czasach ...Development w ręce ludu - czyli wielki powrót twórców niezależnych w czasach ...
Development w ręce ludu - czyli wielki powrót twórców niezależnych w czasach ...Fundacja Rozwoju Branży Internetowej Netcamp
 
Contextual enquiry v1.0
Contextual enquiry v1.0Contextual enquiry v1.0
Contextual enquiry v1.0nazim iqbal
 
Giới thiệu chung về ChợĐiệnTử
Giới thiệu chung về ChợĐiệnTửGiới thiệu chung về ChợĐiệnTử
Giới thiệu chung về ChợĐiệnTửguestbd5f93
 
West Palm Beach, FL 3/24/2005
West Palm Beach, FL 3/24/2005West Palm Beach, FL 3/24/2005
West Palm Beach, FL 3/24/2005TRIC Tools
 

Andere mochten auch (20)

Dorchestercollection
DorchestercollectionDorchestercollection
Dorchestercollection
 
Limpeza do percurso do Corta-mato
Limpeza do percurso do Corta-matoLimpeza do percurso do Corta-mato
Limpeza do percurso do Corta-mato
 
Nadie Se Cruza Por Azar
Nadie Se Cruza Por AzarNadie Se Cruza Por Azar
Nadie Se Cruza Por Azar
 
Marketing w serwisach społecznościowych - Netcamp #14
Marketing w serwisach społecznościowych - Netcamp #14Marketing w serwisach społecznościowych - Netcamp #14
Marketing w serwisach społecznościowych - Netcamp #14
 
Congresaccessibilitat
CongresaccessibilitatCongresaccessibilitat
Congresaccessibilitat
 
Jak Opera Mini wygrała z Apple
Jak Opera Mini wygrała z AppleJak Opera Mini wygrała z Apple
Jak Opera Mini wygrała z Apple
 
Global Warming By Lauraige+Soph
Global Warming By Lauraige+SophGlobal Warming By Lauraige+Soph
Global Warming By Lauraige+Soph
 
Ui03
Ui03Ui03
Ui03
 
Optymalizacja serwisow internetowych - Filestube
Optymalizacja serwisow internetowych - FilestubeOptymalizacja serwisow internetowych - Filestube
Optymalizacja serwisow internetowych - Filestube
 
Capita Selecta Multimedia Presentatie 2
Capita Selecta Multimedia Presentatie 2Capita Selecta Multimedia Presentatie 2
Capita Selecta Multimedia Presentatie 2
 
Corso Slide Sloodle Italia
Corso Slide Sloodle ItaliaCorso Slide Sloodle Italia
Corso Slide Sloodle Italia
 
TRIC High Performance Infrastructure
TRIC High Performance Infrastructure TRIC High Performance Infrastructure
TRIC High Performance Infrastructure
 
Web Standards Presentation - CSS
Web Standards Presentation - CSSWeb Standards Presentation - CSS
Web Standards Presentation - CSS
 
Dorchestercollection
DorchestercollectionDorchestercollection
Dorchestercollection
 
Development w ręce ludu - czyli wielki powrót twórców niezależnych w czasach ...
Development w ręce ludu - czyli wielki powrót twórców niezależnych w czasach ...Development w ręce ludu - czyli wielki powrót twórców niezależnych w czasach ...
Development w ręce ludu - czyli wielki powrót twórców niezależnych w czasach ...
 
Branding Final
Branding FinalBranding Final
Branding Final
 
Contextual enquiry v1.0
Contextual enquiry v1.0Contextual enquiry v1.0
Contextual enquiry v1.0
 
Giới thiệu chung về ChợĐiệnTử
Giới thiệu chung về ChợĐiệnTửGiới thiệu chung về ChợĐiệnTử
Giới thiệu chung về ChợĐiệnTử
 
Calameo1
Calameo1Calameo1
Calameo1
 
West Palm Beach, FL 3/24/2005
West Palm Beach, FL 3/24/2005West Palm Beach, FL 3/24/2005
West Palm Beach, FL 3/24/2005
 

Ähnlich wie LAMP_TRAINING_SESSION_8 (20)

Connecting_to_Database(MySQL)_in_PHP.pptx
Connecting_to_Database(MySQL)_in_PHP.pptxConnecting_to_Database(MySQL)_in_PHP.pptx
Connecting_to_Database(MySQL)_in_PHP.pptx
 
UNIT V (5).pptx
UNIT V (5).pptxUNIT V (5).pptx
UNIT V (5).pptx
 
Database Connectivity MYSQL by Dr.C.R.Dhivyaa Kongu Engineering College
Database Connectivity MYSQL by Dr.C.R.Dhivyaa Kongu Engineering CollegeDatabase Connectivity MYSQL by Dr.C.R.Dhivyaa Kongu Engineering College
Database Connectivity MYSQL by Dr.C.R.Dhivyaa Kongu Engineering College
 
More Php
More PhpMore Php
More Php
 
FYBSC IT Web Programming Unit V Advanced PHP and MySQL
FYBSC IT Web Programming Unit V  Advanced PHP and MySQLFYBSC IT Web Programming Unit V  Advanced PHP and MySQL
FYBSC IT Web Programming Unit V Advanced PHP and MySQL
 
Memcache
MemcacheMemcache
Memcache
 
Php mysq
Php mysqPhp mysq
Php mysq
 
Php 101: PDO
Php 101: PDOPhp 101: PDO
Php 101: PDO
 
SQL Injection Part 2
SQL Injection Part 2SQL Injection Part 2
SQL Injection Part 2
 
Pagination in PHP
Pagination in PHPPagination in PHP
Pagination in PHP
 
Php
PhpPhp
Php
 
veracruz
veracruzveracruz
veracruz
 
veracruz
veracruzveracruz
veracruz
 
veracruz
veracruzveracruz
veracruz
 
veracruz
veracruzveracruz
veracruz
 
4.3 MySQL + PHP
4.3 MySQL + PHP4.3 MySQL + PHP
4.3 MySQL + PHP
 
P H P Part I I, By Kian
P H P  Part  I I,  By  KianP H P  Part  I I,  By  Kian
P H P Part I I, By Kian
 
PHPSpec BDD for PHP
PHPSpec BDD for PHPPHPSpec BDD for PHP
PHPSpec BDD for 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
 
Php MySql For Beginners
Php MySql For BeginnersPhp MySql For Beginners
Php MySql For Beginners
 

Mehr von umapst

LAMP_TRAINING_SESSION_7
LAMP_TRAINING_SESSION_7LAMP_TRAINING_SESSION_7
LAMP_TRAINING_SESSION_7umapst
 
LAMP_TRAINING_SESSION_6
LAMP_TRAINING_SESSION_6LAMP_TRAINING_SESSION_6
LAMP_TRAINING_SESSION_6umapst
 
LAMP_TRAINING_SESSION_5
LAMP_TRAINING_SESSION_5LAMP_TRAINING_SESSION_5
LAMP_TRAINING_SESSION_5umapst
 
LAMP_TRAINING_SESSION_4
LAMP_TRAINING_SESSION_4LAMP_TRAINING_SESSION_4
LAMP_TRAINING_SESSION_4umapst
 
LAMP_TRAINING_SESSION_3
LAMP_TRAINING_SESSION_3LAMP_TRAINING_SESSION_3
LAMP_TRAINING_SESSION_3umapst
 
LAMP_TRAINING_SESSION_2
LAMP_TRAINING_SESSION_2LAMP_TRAINING_SESSION_2
LAMP_TRAINING_SESSION_2umapst
 
LAMP_TRAINING_SESSION_1
LAMP_TRAINING_SESSION_1LAMP_TRAINING_SESSION_1
LAMP_TRAINING_SESSION_1umapst
 
LAMP_TRAINING_SESSION_0
LAMP_TRAINING_SESSION_0LAMP_TRAINING_SESSION_0
LAMP_TRAINING_SESSION_0umapst
 

Mehr von umapst (8)

LAMP_TRAINING_SESSION_7
LAMP_TRAINING_SESSION_7LAMP_TRAINING_SESSION_7
LAMP_TRAINING_SESSION_7
 
LAMP_TRAINING_SESSION_6
LAMP_TRAINING_SESSION_6LAMP_TRAINING_SESSION_6
LAMP_TRAINING_SESSION_6
 
LAMP_TRAINING_SESSION_5
LAMP_TRAINING_SESSION_5LAMP_TRAINING_SESSION_5
LAMP_TRAINING_SESSION_5
 
LAMP_TRAINING_SESSION_4
LAMP_TRAINING_SESSION_4LAMP_TRAINING_SESSION_4
LAMP_TRAINING_SESSION_4
 
LAMP_TRAINING_SESSION_3
LAMP_TRAINING_SESSION_3LAMP_TRAINING_SESSION_3
LAMP_TRAINING_SESSION_3
 
LAMP_TRAINING_SESSION_2
LAMP_TRAINING_SESSION_2LAMP_TRAINING_SESSION_2
LAMP_TRAINING_SESSION_2
 
LAMP_TRAINING_SESSION_1
LAMP_TRAINING_SESSION_1LAMP_TRAINING_SESSION_1
LAMP_TRAINING_SESSION_1
 
LAMP_TRAINING_SESSION_0
LAMP_TRAINING_SESSION_0LAMP_TRAINING_SESSION_0
LAMP_TRAINING_SESSION_0
 

Kürzlich hochgeladen

Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 

Kürzlich hochgeladen (20)

Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 

LAMP_TRAINING_SESSION_8

  • 1.
  • 2. Connecting to MySQL <?php $con = mysql_connect(‘localhost’,’lampusr’,’lamppwd’); If($con) { echo “Connected”; }else{ echo “Could not connect to MySQL”; exit(); } ?>
  • 3. Closing MySQL <?php $con = mysql_connect(‘localhost’,’lampusr’,’lamppwd’); If($con) { echo “Connected”; // do some work with mysql mysql_close($con); }else{ echo “Could not connect to MySQL”; exit(); } ?>
  • 4. Executing Query - Creation <?php mysql_query(“create database if not exists ‘abc’”,$con); mysql_use_db(‘abc’); mysql_query(“create table if not exists trainee(name varchar(30) primary key, score int(3))engine=myisam”); ?>
  • 5. Executing Query - Insert <?php $q = “((‘Trainee1’, 20), (‘Trainee2’,’40’), (‘Trainee3, 60))”; mysql_query(“insert into abc.trainee values $q”); echo mysql_error(); ?> name score trainee1 20 trainee2 40 tainee3 60