SlideShare ist ein Scribd-Unternehmen logo
1 von 13
PAPER NAME : PROGRAMMING IN PHP
STAFF NAME : MS.V.SHANTHI M.SC,M.PHIL,M,TECH,PGDCA.
CLASS : III BCA
SEMESTER : VI
FILE HANDLING:
 This chapter discusses file handling using PHP. Storing data
on the server is especially powerful in web applications,
because it allows you to make data “persist”-that is, stick
around between page accesses. Blogs, guest books, feedback
pages- all are possible when you work with files on the server.
 There’s a lot of PHP technology coming up in this chapter,
starting with opening files .
EXAMPLE:
<html>
<head>
<title>
Reading from a file
</title>
<body>
<h1>
Reading from a file
</h1>
<?php
$handle= fopen(“file.txt”, “r”);
while(!foef($handle)){
.
.
.
}
?>
</body>
</html>
READING A FILE INTO AN ARRAY
WITH FILE:
 You can use the file function to read a file into an array all at
ones; each line becomes an element in the array. Here’s how to
use the file function;
file(file name [, use _ include_ path[,context]])
READING AND WRITING BINARY
FILES:
 You can write binary data with f1write, and read it with fread,
but it takes a little work. You can pack binary data into strings
using the pack function, and unpack binary data using the
unpack function.
Example, phpwritebinary.php, that writes the number 512 to a file
in binary(not string)format. If starts by opening the file for
binary writing like this;
<?php
$number=512;
$handle= fopen(“data.dat”, “wb”);
.
.
DELETING FILES WITH UNLINK:
 Want to delete a file? You can do that with the unlink function:
unlink(filename[,context])
 Here, filename is the name of the file, and context is an
optional context. This function returns TRUE if the file was
deleted, FALSE otherwise.
 You can find an example in phpunlink.php. If the code is
successful in deleting copy.txt, it says so:
<?php
if(unlink(“copy.txt”)){
echo “Deleted the file.”;
}
.
.
LOCKING FILES:
 In a multiuser environment, such as web server, multiple users
may be accessing your scripts at the same time,which means
multiple copies of the same script can operate at the same time.
If your script(s) accesses files, there may be a conflict as to
scripts, or to copies of the same script, tries to write to the same
file at the same time. To fix that, use the file locking function.
 Here, handle is the handle of the file you want to lock, and
operation is one of these:
To attain a shared lock(reader), set operation to LOCK_SH.
To attain an exclusive lock(writer), set operation to LOCK_EX.
To release a lock, set operation to LOCK_UN.
FILE HANDLING OPERATIONS:
 File handling starts with creating a file, reading its content,
writing into a file to conjoin data into an existing file and
finally closing the file. PHP provides predefined functions for
all these operations.
1. Create a file : fopen()
2. Open a file : fopen()
3. Read a file : fread()
4. Write to a file : fwrite()
5. Append to a file: fwrite()
6. Close a file : fclose()
7. Delete a file : unlink()
DATABASE:
What is a database?
 We’ll take a lock at what makes a database here briefly(and if
you are already familiar with databases, tables, and so on , you
can naturally skip this intro).
 Databases organise data for easy access and use by
programs.the most popular database construct is the table and
we’ll take a lock at tables here. Say, foe example that you’re
teaching PHP to a class of students and want to keep track of
their scores. You might create a table with two columns, Name
and Grade:
PHP SUPPORTED DATABASES:
Adabas Ingres Oracle
dBase InterBase Ovrimos
Empress FrontBase PostgreSQl
FilePro mSQL Solid
Hyperwave Direct MS-SQL Sybase
IBM DB2 MS-SQL Velocis
Informix ODBC Unix dbm
Accessing the database in PHP:
 When you install PHP, you can select from a number of
protraction. To install support for My SQL, click the
extension node in the installer to open that node and select the
My SQL node to install that extension. Your PHP installation
may have already been installed with My SQL support most
installation on web servers are.
 The My SQL support in PHP consists of a number of
functions you can call to interact with My SQL, and here they
are:
 My sql affected rows Get the number of rows affected by the
previous MySQL operation.
 My sql change user Change the logged-in user.
 My sql client encoding Return the name of the current
character set.
 My sql close Close a MySQL connection.
 My sql connect Open a connection to a MySQL Server.
 My sql create db Create a MySQL database.
 My sql data seek Seek data in the database.
 My sql db name Get the name of the database.
 My sql db query Send a My SQL query.

Weitere ähnliche Inhalte

Was ist angesagt?

Installation of OpenBiblio on Windows XP using EasyPHP
Installation of OpenBiblio on Windows XP using EasyPHPInstallation of OpenBiblio on Windows XP using EasyPHP
Installation of OpenBiblio on Windows XP using EasyPHPRupesh Kumar
 
Backup Restore Migration Wordpress hosted on 1and1
Backup Restore Migration Wordpress hosted on 1and1Backup Restore Migration Wordpress hosted on 1and1
Backup Restore Migration Wordpress hosted on 1and1Francisco Servera
 
Slide 1 - The University of Mississippi
Slide 1 - The University of MississippiSlide 1 - The University of Mississippi
Slide 1 - The University of Mississippiwebhostingguy
 
PHP BASIC PRESENTATION
PHP BASIC PRESENTATIONPHP BASIC PRESENTATION
PHP BASIC PRESENTATIONkrutitrivedi
 
Apache Server Tutorial
Apache Server TutorialApache Server Tutorial
Apache Server TutorialJagat Kothari
 
Class 1 - World Wide Web Introduction
Class 1 - World Wide Web IntroductionClass 1 - World Wide Web Introduction
Class 1 - World Wide Web IntroductionAhmed Swilam
 
Introduction to Drupal CMS
Introduction to Drupal CMSIntroduction to Drupal CMS
Introduction to Drupal CMSParameshwar Babu
 
Securing the Apache web server
Securing the Apache web serverSecuring the Apache web server
Securing the Apache web serverwebhostingguy
 
PHP in one presentation
PHP in one presentationPHP in one presentation
PHP in one presentationMilad Rahimi
 

Was ist angesagt? (20)

Installation of OpenBiblio on Windows XP using EasyPHP
Installation of OpenBiblio on Windows XP using EasyPHPInstallation of OpenBiblio on Windows XP using EasyPHP
Installation of OpenBiblio on Windows XP using EasyPHP
 
Backup Restore Migration Wordpress hosted on 1and1
Backup Restore Migration Wordpress hosted on 1and1Backup Restore Migration Wordpress hosted on 1and1
Backup Restore Migration Wordpress hosted on 1and1
 
Slide 1 - The University of Mississippi
Slide 1 - The University of MississippiSlide 1 - The University of Mississippi
Slide 1 - The University of Mississippi
 
Lamp introduction in Fedora
Lamp introduction in FedoraLamp introduction in Fedora
Lamp introduction in Fedora
 
PHP BASIC PRESENTATION
PHP BASIC PRESENTATIONPHP BASIC PRESENTATION
PHP BASIC PRESENTATION
 
File upload php
File upload phpFile upload php
File upload php
 
Apache Server Tutorial
Apache Server TutorialApache Server Tutorial
Apache Server Tutorial
 
Class 1 - World Wide Web Introduction
Class 1 - World Wide Web IntroductionClass 1 - World Wide Web Introduction
Class 1 - World Wide Web Introduction
 
Installation of Openbiblio using Easyphp
Installation of Openbiblio using EasyphpInstallation of Openbiblio using Easyphp
Installation of Openbiblio using Easyphp
 
Introduction to Drupal CMS
Introduction to Drupal CMSIntroduction to Drupal CMS
Introduction to Drupal CMS
 
Securing the Apache web server
Securing the Apache web serverSecuring the Apache web server
Securing the Apache web server
 
Apache Web Server Setup 2
Apache Web Server Setup 2Apache Web Server Setup 2
Apache Web Server Setup 2
 
Chp 08 php (shared)
Chp 08   php  (shared) Chp 08   php  (shared)
Chp 08 php (shared)
 
Encrypting/Decrypting mule
Encrypting/Decrypting  muleEncrypting/Decrypting  mule
Encrypting/Decrypting mule
 
File Uploading in PHP
File Uploading in PHPFile Uploading in PHP
File Uploading in PHP
 
Apache Web Server Setup 3
Apache Web Server Setup 3Apache Web Server Setup 3
Apache Web Server Setup 3
 
File Upload
File UploadFile Upload
File Upload
 
PHP in one presentation
PHP in one presentationPHP in one presentation
PHP in one presentation
 
Apache
ApacheApache
Apache
 
Apache web service
Apache web serviceApache web service
Apache web service
 

Ähnlich wie File handling

Ähnlich wie File handling (20)

CONTENT MANAGEMENT SYSTEM
CONTENT MANAGEMENT SYSTEMCONTENT MANAGEMENT SYSTEM
CONTENT MANAGEMENT SYSTEM
 
GTU MCA PHP Interview Questions And Answers for freshers
GTU MCA PHP  Interview Questions And Answers for freshersGTU MCA PHP  Interview Questions And Answers for freshers
GTU MCA PHP Interview Questions And Answers for freshers
 
PHP Basics
PHP BasicsPHP Basics
PHP Basics
 
Unit 1
Unit 1Unit 1
Unit 1
 
Php interview-questions and answers
Php interview-questions and answersPhp interview-questions and answers
Php interview-questions and answers
 
Php basics
Php basicsPhp basics
Php basics
 
Php Unit 1
Php Unit 1Php Unit 1
Php Unit 1
 
Php Interview Questions
Php Interview QuestionsPhp Interview Questions
Php Interview Questions
 
Php Applications with Oracle by Kuassi Mensah
Php Applications with Oracle by Kuassi MensahPhp Applications with Oracle by Kuassi Mensah
Php Applications with Oracle by Kuassi Mensah
 
Wamp & LAMP - Installation and Configuration
Wamp & LAMP - Installation and ConfigurationWamp & LAMP - Installation and Configuration
Wamp & LAMP - Installation and Configuration
 
4 Basic PHP
4 Basic PHP4 Basic PHP
4 Basic PHP
 
Drupal 8 meets to symphony
Drupal 8 meets to symphonyDrupal 8 meets to symphony
Drupal 8 meets to symphony
 
Flyr PHP micro-framework
Flyr PHP micro-frameworkFlyr PHP micro-framework
Flyr PHP micro-framework
 
Php intro
Php introPhp intro
Php intro
 
Php intro
Php introPhp intro
Php intro
 
Php intro
Php introPhp intro
Php intro
 
Apache web server
Apache web serverApache web server
Apache web server
 
PHP Unit-1 Introduction to PHP
PHP Unit-1 Introduction to PHPPHP Unit-1 Introduction to PHP
PHP Unit-1 Introduction to PHP
 
XOOPS 2.5.x Debugging with FirePHP/FireBug
XOOPS 2.5.x Debugging with FirePHP/FireBugXOOPS 2.5.x Debugging with FirePHP/FireBug
XOOPS 2.5.x Debugging with FirePHP/FireBug
 
Php
PhpPhp
Php
 

Kürzlich hochgeladen

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
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
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 

Kürzlich hochgeladen (20)

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
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
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 

File handling

  • 1.
  • 2. PAPER NAME : PROGRAMMING IN PHP STAFF NAME : MS.V.SHANTHI M.SC,M.PHIL,M,TECH,PGDCA. CLASS : III BCA SEMESTER : VI
  • 3. FILE HANDLING:  This chapter discusses file handling using PHP. Storing data on the server is especially powerful in web applications, because it allows you to make data “persist”-that is, stick around between page accesses. Blogs, guest books, feedback pages- all are possible when you work with files on the server.  There’s a lot of PHP technology coming up in this chapter, starting with opening files .
  • 4. EXAMPLE: <html> <head> <title> Reading from a file </title> <body> <h1> Reading from a file </h1> <?php $handle= fopen(“file.txt”, “r”); while(!foef($handle)){ . . . } ?> </body> </html>
  • 5. READING A FILE INTO AN ARRAY WITH FILE:  You can use the file function to read a file into an array all at ones; each line becomes an element in the array. Here’s how to use the file function; file(file name [, use _ include_ path[,context]])
  • 6. READING AND WRITING BINARY FILES:  You can write binary data with f1write, and read it with fread, but it takes a little work. You can pack binary data into strings using the pack function, and unpack binary data using the unpack function. Example, phpwritebinary.php, that writes the number 512 to a file in binary(not string)format. If starts by opening the file for binary writing like this; <?php $number=512; $handle= fopen(“data.dat”, “wb”); . .
  • 7. DELETING FILES WITH UNLINK:  Want to delete a file? You can do that with the unlink function: unlink(filename[,context])  Here, filename is the name of the file, and context is an optional context. This function returns TRUE if the file was deleted, FALSE otherwise.  You can find an example in phpunlink.php. If the code is successful in deleting copy.txt, it says so: <?php if(unlink(“copy.txt”)){ echo “Deleted the file.”; } . .
  • 8. LOCKING FILES:  In a multiuser environment, such as web server, multiple users may be accessing your scripts at the same time,which means multiple copies of the same script can operate at the same time. If your script(s) accesses files, there may be a conflict as to scripts, or to copies of the same script, tries to write to the same file at the same time. To fix that, use the file locking function.  Here, handle is the handle of the file you want to lock, and operation is one of these: To attain a shared lock(reader), set operation to LOCK_SH. To attain an exclusive lock(writer), set operation to LOCK_EX. To release a lock, set operation to LOCK_UN.
  • 9. FILE HANDLING OPERATIONS:  File handling starts with creating a file, reading its content, writing into a file to conjoin data into an existing file and finally closing the file. PHP provides predefined functions for all these operations. 1. Create a file : fopen() 2. Open a file : fopen() 3. Read a file : fread() 4. Write to a file : fwrite() 5. Append to a file: fwrite() 6. Close a file : fclose() 7. Delete a file : unlink()
  • 10. DATABASE: What is a database?  We’ll take a lock at what makes a database here briefly(and if you are already familiar with databases, tables, and so on , you can naturally skip this intro).  Databases organise data for easy access and use by programs.the most popular database construct is the table and we’ll take a lock at tables here. Say, foe example that you’re teaching PHP to a class of students and want to keep track of their scores. You might create a table with two columns, Name and Grade:
  • 11. PHP SUPPORTED DATABASES: Adabas Ingres Oracle dBase InterBase Ovrimos Empress FrontBase PostgreSQl FilePro mSQL Solid Hyperwave Direct MS-SQL Sybase IBM DB2 MS-SQL Velocis Informix ODBC Unix dbm
  • 12. Accessing the database in PHP:  When you install PHP, you can select from a number of protraction. To install support for My SQL, click the extension node in the installer to open that node and select the My SQL node to install that extension. Your PHP installation may have already been installed with My SQL support most installation on web servers are.
  • 13.  The My SQL support in PHP consists of a number of functions you can call to interact with My SQL, and here they are:  My sql affected rows Get the number of rows affected by the previous MySQL operation.  My sql change user Change the logged-in user.  My sql client encoding Return the name of the current character set.  My sql close Close a MySQL connection.  My sql connect Open a connection to a MySQL Server.  My sql create db Create a MySQL database.  My sql data seek Seek data in the database.  My sql db name Get the name of the database.  My sql db query Send a My SQL query.