DAY 10 | PHP AND MYSQL | VI SEM | B.CA | ACCESSING MYSQL | L1

Vidhyaashram
26 Apr 202426:01

Summary

TLDRThe video script introduces the concept of databases, explaining them as organized collections of related data. It delves into Database Management Systems (DBMS), highlighting their role in managing and manipulating databases through various commands. The script focuses on MySQL, a popular relational DBMS, and its integration with PHP for creating dynamic web pages. It covers essential MySQL commands, such as creating and manipulating tables, inserting data, and setting up connections using PHP. The session aims to equip viewers with foundational knowledge to work effectively with databases and PHP.

Takeaways

  • πŸ˜€ A database is a collection of related data, organized in a structured format.
  • πŸ” To interact with a database, one must know specific commands that allow manipulation and management of the data.
  • 🏫 The speaker is a faculty member from the Department of Computer Science at Vidyashram First Grade College, introducing a PHP and MySQL class.
  • πŸ“š The session covers the basics of MySQL, a structured query language used for relational database management systems (RDBMS).
  • πŸ’Ύ Data is defined as raw facts, which can be static or figures, and is categorized by type such as text, number, or image.
  • πŸ“ˆ A database management system (DBMS) is application software used to manage and manipulate databases effectively.
  • πŸ”‘ MySQL is a popular RDBMS developed by Oracle Corporation, which uses tables organized in rows and columns.
  • πŸ› οΈ Commands like CREATE, INSERT, SELECT, UPDATE, and DROP are essential for database operations such as creating tables, inserting data, querying information, and deleting tables.
  • πŸ”— The script demonstrates how to connect PHP with MySQL, highlighting the use of variables for server name, username, and password.
  • πŸ’» The session concludes with a practical example of connecting to a MySQL database using PHP, emphasizing the importance of checking the connection for errors.

Q & A

  • What is a database?

    -A database is a collection of related data, organized in a way that makes it easily accessible and manageable.

  • Why is it necessary to know commands to work with a database?

    -Commands are essential to interact with a database, allowing users to perform operations such as creating tables, inserting values, querying data, and managing the database.

  • What is the role of a Database Management System (DBMS)?

    -A DBMS is application software used to manage and manipulate databases. It facilitates the creation, querying, maintenance, and modification of databases.

  • What is the difference between data and a database?

    -Data refers to raw facts or figures, which can be static or dynamic. A database, on the other hand, is a structured collection of related data, typically organized in tables with rows and columns.

  • Can you explain the concept of a relational database management system?

    -A relational database management system (RDBMS) organizes data in tables with rows and columns. It uses a structured query language, like MySQL, to manage the data.

  • What is MySQL and how does it relate to PHP?

    -MySQL is a structured query language used for RDBMS. It can be used with PHP, a server-side scripting language, to create dynamic web pages and websites by connecting to MySQL databases and executing queries.

  • What command is used to create a new database in MySQL?

    -The command to create a new database in MySQL is 'CREATE DATABASE' followed by the database name, used to check if the database name already exists before creating it.

  • How do you insert values into a table in MySQL?

    -To insert values into a table in MySQL, you use the 'INSERT INTO' command followed by the table name and the values you want to insert into the specified columns.

  • What is the purpose of a primary key in a database?

    -A primary key is used to uniquely identify each record in a database table. It ensures that no two records have the same value for the primary key field.

  • How can you connect to a MySQL database using PHP?

    -In PHP, you can connect to a MySQL database using the 'mysqli' or 'PDO' extension. You need to provide the server name, username, and password to establish a connection.

  • What is the significance of the 'ALTER TABLE' command in MySQL?

    -The 'ALTER TABLE' command in MySQL is used to modify the structure of an existing table, such as adding or dropping columns, or modifying existing columns.

Outlines

00:00

πŸ“š Introduction to Databases and MySQL

This paragraph introduces the concept of a database as a collection of related data and the necessity of commands to interact with it. It sets the stage for a PHP and MySQL class, explaining the basics of database management systems (DBMS) and differentiating between data and databases. The speaker, a faculty member from the Department of Computer Science, discusses the role of DBMS in managing and manipulating databases, giving examples of various types of databases and their applications.

05:00

πŸ” Exploring Database Management Systems and MySQL

The speaker delves deeper into the types of database management systems, including object-oriented, relational, multimedia, network, and hierarchical systems. MySQL is highlighted as a product of Oracle Corporation and a prime example of a relational DBMS, which organizes data in rows and columns. The paragraph explains the MySQL commands based on Structured Query Language (SQL) and its compatibility with various operating systems. The concept of a query is introduced, describing how users write queries that are executed by the server to process and return data.

10:03

πŸ› οΈ Database Operations and Table Management

This section focuses on the practical aspects of working with databases, including checking the existence of a database, creating and using databases, and manipulating tables. The speaker explains the commands for creating a database with 'create database if not exists', using a database with 'use', and deleting a database with 'drop database if exists'. The concept of tables as organized collections of related data in rows and columns is discussed, along with commands for creating, checking, and displaying tables.

15:06

πŸ“‹ Inserting and Manipulating Data in Tables

The paragraph discusses the process of inserting data into a table using the 'insert into' command, specifying the table name and the values to be inserted. It also covers how to delete a table using the 'drop table' command and how to display all tables in a database with the 'show tables' command. Further, it explains how to add new columns to a table or delete existing columns using the 'alter table' command, emphasizing the importance of understanding these commands for effective database management.

20:07

πŸ”‘ Understanding Primary Keys and PHP MySQL Connection

The importance of primary keys in uniquely identifying records in a database is explained, with an example of how to add and delete primary keys using the 'alter table' command. The paragraph then transitions to a sample PHP program that demonstrates how to connect to a MySQL database, detailing the variables and functions involved in establishing a connection and checking for errors. The focus is on the practical application of PHP and MySQL in creating dynamic web pages or websites.

25:10

πŸŽ“ Conclusion and Course Overview

In the concluding paragraph, the speaker summarizes the unit on MySQL and its commands, emphasizing the importance of understanding these concepts for creating dynamic web content. The structure of the subject, with five different units each carrying 12 marks, is outlined, indicating what students can expect in their final exams. The speaker thanks the students for their engagement and encourages them to continue learning, promising to meet again in another subject video.

Mindmap

Keywords

πŸ’‘Database

A database is an organized collection of data, typically stored and accessed electronically. In the context of the video, a database is a fundamental concept for managing structured sets of related data, such as a student database containing records with fields like role number, name, and marks. The script uses the term to explain the basic unit of data storage and manipulation in database management systems.

πŸ’‘Database Management System (DBMS)

A DBMS is application software that interacts with the user, software, and hardware to capture and analyze data. It includes various functionalities such as creating, querying, and maintaining databases. The video script emphasizes the role of a DBMS in managing and manipulating data effectively, distinguishing between different types of DBMS like relational, object-oriented, and hierarchical systems.

πŸ’‘MySQL

MySQL is a popular open-source relational database management system (RDBMS). It uses structured query language (SQL) for database management. The script introduces MySQL as an example of an RDBMS, highlighting its use in conjunction with PHP for creating dynamic web pages and applications.

πŸ’‘Structured Query Language (SQL)

SQL is a standard language for managing and manipulating relational databases. It is used for creating, modifying, and querying databases. The video script explains SQL as the basis for MySQL commands and discusses its importance in interacting with databases through commands like 'CREATE', 'INSERT', and 'SELECT'.

πŸ’‘Table

In the context of databases, a table is a collection of related data stored in rows and columns. The script describes a table as the primary structure for organizing data within a database, using examples such as a 'student' table with columns for role number, name, and marks.

πŸ’‘Primary Key

A primary key is a unique identifier for a record in a database table. It ensures that each row within a table can be uniquely identified. The script explains the concept of a primary key as a way to uniquely identify records, such as assigning a unique role number to each student in a 'student' table.

πŸ’‘PHP

PHP is a server-side scripting language used for web development. The script mentions PHP as the front-end design language used in conjunction with MySQL for creating dynamic web pages, indicating its role in server-side logic and database interaction.

πŸ’‘Data

Data refers to raw facts or figures that can be stored and recorded. The script defines data as the basic building blocks of information, which can be in various forms such as text, numbers, images, or multimedia files, and are organized into databases for structured storage and retrieval.

πŸ’‘Insert

The 'INSERT' command in SQL is used to add new records to a database table. The script explains how to use the 'INSERT' command to insert values into a specified table, illustrating the process with examples of inserting student data.

πŸ’‘Alter

The 'ALTER' command in SQL is used to modify the structure of a database table, such as adding or dropping columns. The script describes the 'ALTER' command as a way to change the fields of a table, such as adding a new column or dropping an existing one.

πŸ’‘Drop

The 'DROP' command in SQL is used to delete a database table or to remove a column from a table. The script explains the 'DROP' command as a means to delete an entire table or to remove specific columns, thus altering the structure of the database.

Highlights

A database is defined as a collection of related data.

Understanding database commands is essential for interaction with a database.

Introduction to PHP and MySQL as a class by a faculty member from the Department of Computer Science.

Data is presented as raw facts or figures and can be static or dynamic.

A database management system (DBMS) is application software used to manage and manipulate databases.

Different types of DBMS include object-oriented, relational, multimedia, network, and hierarchical systems.

MySQL is a product of Oracle Corporation and is an example of a relational DBMS.

MySQL commands are based on the Structured Query Language (SQL) and support various operating systems.

A query is a request for information from a database, written by the user and executed by the server.

The process of connecting to a MySQL server requires a username and password.

The 'CREATE DATABASE' command checks for the existence of a database before creation.

The 'USE' command allows the user to work with a specific database.

The 'DROP DATABASE' command is used to delete a database if it exists.

The 'SHOW DATABASES' command displays a list of databases stored on the server.

Tables are created using the 'CREATE TABLE' command with specified column names and data types.

The 'INSERT INTO' command is used to insert values into a specified table.

The 'ALTER TABLE' command is used to modify an existing table by adding or dropping columns.

Primary keys are used to uniquely identify records in a database table.

PHP and MySQL can be used together to create dynamic web pages or websites.

The importance of understanding MySQL commands for creating and managing databases in PHP programming.

The session concludes with an overview of the subject matter and the structure of the course.

Transcripts

play00:00

what is database it's a collection of

play00:02

related data is known as datab base

play00:07

suppose if I want to work with database

play00:11

what I want I must know certain command

play00:15

with the help of commands only I can

play00:18

able to interact with the datab base

play00:21

after creating a table okay what I want

play00:24

to do I want to insert the values into

play00:27

the table for that I'm going to have a

play00:31

command called

play00:38

insert hello to all a warm welcome to

play00:42

PHP and MySQL class in this session I'm

play00:46

going to deal about accessing my SQL I'm

play00:50

your reati M faculty from the Department

play00:53

of computer science vidyashram first

play00:55

grade College the Temple of Excellence

play00:58

mauru so dear student in my today's

play01:02

session I'm going to deal with mySQL

play01:05

along with the commands of the

play01:08

MySQL so dear student we are familiar

play01:12

with the concept datab base management

play01:17

system so dear student at the beginning

play01:20

I'm going to divide this database into

play01:24

okay data okay then database

play01:30

then I'm going to divide it into

play01:32

database management system let me to

play01:37

discuss what is data so what is data

play01:40

data is nothing but the raw fact or it

play01:44

can be a static or it can be a figure

play01:49

and if it is stored or recorded then it

play01:53

is called data for example if I consider

play01:57

name okay it's soft typ what

play02:02

text okay fine if I consider

play02:05

age it's of what

play02:08

number if I consider the

play02:13

image it's of Type image so the example

play02:17

for data is name number image audio file

play02:23

video file and so on then what about

play02:27

database database is nothing but the

play02:31

collection of related data collection of

play02:35

related

play02:38

data so what is related data okay fine

play02:42

if I consider think that I have a

play02:46

database called

play02:49

student if I consider student database

play02:52

what are the thing I can have I can have

play02:56

the role number that is nothing but the

play03:01

usn then I can have the name of the

play03:05

student at the same time I can have

play03:08

the marks I can have the total even I

play03:12

can have the percentage okay and if I

play03:17

have certain records in this database

play03:21

and each fields are related to each

play03:24

other then it is called database so what

play03:28

is database it's the collection of

play03:31

related data is known as datab base then

play03:36

what about database management system

play03:39

see here I have the data I have the

play03:43

database now what I want I want the

play03:45

software to manage my database

play03:48

effectively for that I'm going to have

play03:51

the database management system so what

play03:55

is database management system it's a

play03:58

application software

play04:00

used to manage and manipulate database

play04:04

so what is manage and manipulate there

play04:07

nothing but the creating the database

play04:09

inserting the data to the database then

play04:13

quering the quering the requirement or

play04:17

quering the information maintaining the

play04:21

database okay modifying the database all

play04:24

these things are together called as

play04:27

manipulation so what is data datase it's

play04:30

a what is database it's a collection of

play04:33

related data and what about database

play04:35

management system it's a it's a

play04:38

application software used to manage and

play04:41

manipulate the

play04:43

database and if I consider database I

play04:47

can have the examples like student

play04:49

database employee

play04:51

database I can have the bank customer

play04:54

database okay these are the example for

play04:58

database and if I consider consider the

play05:00

database management system I can have

play05:02

the objectoriented database management

play05:05

system even I can have the relational

play05:07

database management system even I can

play05:10

have the multimedia database management

play05:13

system Network database management

play05:15

system hierarchical database management

play05:18

system so these are the example for

play05:20

database management system then the

play05:23

question arises what is my SQL so my SQL

play05:28

is nothing but the my structured query

play05:32

language it's example for relational

play05:36

database management system so what is

play05:39

relational database management system

play05:42

that's nothing but the tables are stored

play05:45

in the form of rows and columns that is

play05:50

known as relational database management

play05:53

system and this MySQL is the product of

play05:57

Oracle Corporation

play05:59

so what is myos stands for my structured

play06:03

query language okay now I'm going to use

play06:07

my SQL with the PHP so what is my front

play06:12

end design okay I'm going to use I'm

play06:15

going to use PHP and whatever the back

play06:19

end that's nothing but the my SQL okay

play06:22

fine see here MySQL commands are based

play06:27

on this structured query language okay

play06:31

which can support various operating

play06:34

system in the sense what I can able to

play06:37

install my

play06:40

configuration with various operating

play06:42

systems like Unix operating system or

play06:45

Linux operating system Mac operating

play06:48

system as well as Windows operating

play06:52

system and this

play06:54

MySQL command line command okay so we

play06:59

have the we are going to get the command

play07:01

prompt okay we are going to get the

play07:02

screen so we are going to provide the

play07:05

commands in the sense what we are going

play07:07

to write the query okay so what is query

play07:11

see here if I consider user okay users

play07:15

are responsible for writing the query so

play07:19

who is going to write the query that is

play07:21

none other than user okay that query is

play07:25

executed by the server okay if I

play07:28

consider if I consider MySQL where I'm

play07:31

going to execute MySQL is responsible

play07:34

for executing the query after that

play07:37

executing in the sense what it's going

play07:39

to process the query and it's going to

play07:41

return return the output so this command

play07:45

allows us to connect with mySQL servers

play07:50

with the user and that is username and

play07:54

password suppose if I want to connect my

play07:57

SQL Server what are the thing I want

play07:59

want I want the username as well as

play08:02

password anyway dear student we are

play08:05

familiar with SQL right so that

play08:08

structured query language so if I want

play08:12

to connect to the database if I want to

play08:16

connect what I want I want the username

play08:18

as well as password similarly if I want

play08:21

to connect with mySQL server what I

play08:24

required I required the username as well

play08:28

as password

play08:30

so this is the example okay suppose if I

play08:32

want to connect what's the command I

play08:35

want to follow that's nothing but the

play08:38

MySQL here U stands for username minus U

play08:42

and you have to specify the username and

play08:45

what about minus P okay it is minus P so

play08:50

minus P stands for what it is password

play08:54

suppose if I want to set the new

play08:56

password

play08:58

MySQL okay okay it is username minus U

play09:02

to set new password minus P now see here

play09:07

suppose if I want to work with database

play09:11

so what is database the datas are

play09:14

organized in the form of rows and

play09:17

columns okay that is called as

play09:21

database suppose if I want to work with

play09:25

database what I want I must know certain

play09:29

command

play09:30

with the help of commands only I can

play09:32

able to interact with the datab base so

play09:36

a datab base stores the organized

play09:40

collection of records records are

play09:42

nothing but the data that can be

play09:45

accessed and managed very easily and

play09:50

datas are represented in the form of

play09:53

tables so what is table see this is my

play09:56

table what are the thing I have I have

play09:59

the columns and I have the rows so this

play10:02

is my column and what about this this is

play10:06

my row so what is a database it's a

play10:10

collection of related data and datas are

play10:13

organized in the form of table okay fine

play10:17

suppose if I want to check the existence

play10:20

of the database okay in the sense what

play10:23

suppose if I want to check the database

play10:26

name is present in the database or not

play10:30

so what I will do I'll use a command

play10:33

called create so what's the command name

play10:35

here create is a command name and I'll

play10:39

write the keyword

play10:41

database if not exits okay then I'm

play10:46

going to specify the database name it

play10:50

mainly used to check the database is

play10:54

already name of the database is already

play10:58

present or

play10:59

not now okay see here

play11:05

MySQL use database name think that I

play11:10

have a I have created a database what is

play11:13

the name of the

play11:15

database

play11:17

student okay fine now what I want to do

play11:21

I want to use this database okay inside

play11:24

this database I want to create the

play11:27

tables like course

play11:30

I want to create the tables like fees

play11:34

okay I want to create the table like

play11:38

internal marks

play11:40

Now to create a table what I want I want

play11:44

the database so I want to use the

play11:46

database for that I'm going to have the

play11:49

command called use so what is the

play11:51

command name use and I want to write the

play11:54

database

play11:56

name okay fine suppose there are certain

play12:00

time I want to delete the database from

play12:03

the date I want to delete the database

play12:06

okay for that what I will do I'll use a

play12:10

command called drop okay what's my

play12:13

command name drop then specify the

play12:16

database name if exits okay what you

play12:21

have to do you have to write the

play12:23

database name next suppose if I want to

play12:28

display the

play12:29

databases then I have the commands like

play12:33

show what's the command name show

play12:37

database so it's going to display the

play12:40

list of the DAT list of the database

play12:43

which is stored in the current

play12:46

server okay fine now I have a concept

play12:50

called working with tables so what is

play12:54

table it's a collection of related data

play12:58

stored in the form of rows and columns

play13:02

in the form of in the format of what

play13:06

database okay now we have certain

play13:09

commands Okay at the same time we are

play13:12

going to display the syntax how to

play13:14

create a table how to check the

play13:17

existence of the table and so on now see

play13:21

here suppose if I want to create a table

play13:25

what is the command I'm going to use

play13:27

that is nothing but the create as a

play13:30

command at the same time I want to

play13:33

specify the user

play13:36

defined table name okay use the defined

play13:40

table name so what about this one table

play13:43

it's a keyword it's a key word then what

play13:48

about table name it's a user

play13:53

defined so user

play13:56

defined table name

play14:00

name create table I want to check right

play14:03

suppose whatever the table I'm going to

play14:06

create it's already stored in the

play14:09

current server or not for that okay I

play14:12

have the condition not exits okay and

play14:16

you have to specify the table name at

play14:20

the same time what I'm doing here I'm

play14:23

displaying the column list for example

play14:27

okay say what is my table name table

play14:30

name is

play14:32

stud okay fine if I consider the student

play14:36

what are the column I have that is role

play14:41

number okay then

play14:45

name then percentage I'll consider only

play14:49

the percentage or I can consider only

play14:51

the result so instead of percentage I

play14:53

can

play14:53

consider result

play14:57

Okay so these role number name and

play15:02

results are nothing but the column

play15:06

list after creating a table okay what I

play15:09

want to do I want to insert the values

play15:12

into the table for that I'm going to

play15:15

have a command called insert so what is

play15:19

my command name insert is my command

play15:22

name okay into as a

play15:25

keyword and I want to write the table

play15:29

name okay fine so field one field 2

play15:32

field

play15:33

n values okay and I'm going to specify

play15:37

the values so here fields are nothing

play15:40

but the name of the column so here if I

play15:43

consider the example role number is

play15:46

nothing but my field name is nothing but

play15:49

my field and result is also my

play15:54

field okay fine so what is the command

play15:56

used to create a table create table

play15:59

table I want to check the presence of

play16:01

the table so not exits okay then table

play16:06

name column okay it's a list of columns

play16:10

then to insert a value what's the

play16:13

command insert into table name and

play16:17

specify the role that is specify the

play16:21

columns that nothing but the field one

play16:23

field two up to field n values you have

play16:27

to enter the value so it is value one

play16:30

value two value

play16:33

n suppose if I want to delete a table

play16:36

what's the command okay I'm going to use

play16:39

the command called drop then I'm going

play16:42

to specify the table okay is a keyword

play16:47

if exits okay and I'm going to write the

play16:50

table name so if I consider this example

play16:53

what's my table name stud is nothing but

play16:56

the table name

play16:59

okay suppose if I want to show the

play17:01

tables which is present in the

play17:04

particular database what's the command I

play17:07

have the command called show okay I have

play17:10

the command called show and I'll write

play17:14

tables so this command helps to display

play17:19

long list of table names next suppose if

play17:23

I want to add new column that's nothing

play17:26

but the new field to the existing in

play17:29

table then what's the command name alter

play17:32

is my command name table okay specify

play17:36

the table name add and I'm going to add

play17:40

the column

play17:43

names suppose if I want to delete any

play17:46

column then what is the command name

play17:48

alter is a command Okay table and I'm

play17:52

going to write the table name okay fine

play17:56

then I'll write drop

play17:59

okay fine suppose if I want to alter the

play18:02

table okay what is the command alter

play18:04

table table name then suppose if I want

play18:08

to delete the column after deleting the

play18:10

column what's going to happen I'm just

play18:13

changing the table okay I'm just

play18:16

changing the fields of the table so what

play18:19

I will do first I'm going to start with

play18:21

the alter table table name then I'm

play18:24

going to continue with drop which field

play18:28

that's Nothing But The Columns I want to

play18:30

drop I'm going to specify in my

play18:33

query okay fine suppose if I want to add

play18:37

any primary key so why I want primary

play18:41

key so what is p primary key stands for

play18:45

dear student if I consider class okay

play18:48

for example final year sixth semester

play18:51

BCA students so that is third third year

play18:55

that's nothing the final year okay which

play18:57

semester six semester BCA student in my

play19:01

class okay I have three

play19:04

members whose name is Arash okay so

play19:08

three members name is Arash so what I

play19:12

want to do how I'm going to identify the

play19:16

names uniquely for that I'm going to

play19:19

have the primary key so in order to

play19:23

identify the fields uniquely I'm going

play19:27

to use primary the key okay so first

play19:32

what I will do for the first student

play19:35

okay for example

play19:37

say my primary key is integer so I'm

play19:40

going to assign the value one next for

play19:43

second student okay what's the primary

play19:47

key it is two for the third one what is

play19:50

the key it is three so what is primary

play19:55

key it's a unique identification

play19:58

number so I just want to identify two or

play20:03

more records uniquely for that I'm going

play20:06

to have the primary key now how to add a

play20:11

primary key so what's the command alter

play20:15

table why I use alter table because this

play20:18

table is created already okay so I just

play20:22

want to modify that table so I'll start

play20:25

with the alter table I'm going to write

play20:29

the table name what I want to do I want

play20:32

to add the primary key so add primary

play20:37

key and which field I want to add

play20:40

primary key so it is nothing but the

play20:42

role number right so I want to specify

play20:46

the column name that's nothing but the

play20:47

field name that's nothing but the row

play20:49

number suppose if I want to delete the

play20:51

primary key what's the command delete

play20:54

primary key okay so alter as a command

play21:00

alter table I'm going to specify the

play21:03

table name at the same time I'm going to

play21:05

drop the primary key okay fine now I

play21:10

have some sample program how we can able

play21:13

to connect the mySQL

play21:18

database okay fine so what is MySQL I

play21:22

object oriented so what is sqli I stands

play21:26

for my structure query language improved

play21:31

version okay it is nothing but the

play21:33

improved version and here I'm writing

play21:36

which programming PHP program so I'm

play21:40

writing the PHP program so how many

play21:43

variables I'm considering here three

play21:47

variables one for server name okay one

play21:51

for usern name and one for password so

play21:55

what is the name of the server that's

play21:56

nothing but the Local Host

play21:59

what is the name of the user that is

play22:02

username and what is password it is

play22:06

password okay all are what string okay

play22:10

fine so I'm going to take a variable

play22:13

called connection so in PHP if I cons if

play22:19

I want to Define any variables we are

play22:21

going to prefix the variable name with

play22:24

the dollar

play22:26

sign okay I'm going to establish new new

play22:28

connection so new mysqli I okay I want

play22:34

to consider the server name what I want

play22:37

to pass server name then username and

play22:41

password okay now I'm going to check the

play22:44

connection if connection is connected

play22:48

and if there is any error okay while

play22:51

establishing the

play22:52

connection if the sun if the myql

play22:56

generates any error what I want to do I

play22:59

want to check the connectivity right

play23:03

so I'm going to check the connectivity

play23:06

if it generates an error what I want to

play23:09

do I want to I want to stop the

play23:12

connection right so I'll use a method

play23:16

called die okay connection failed okay

play23:20

I'm going to display the error what kind

play23:23

of error and why the connection has got

play23:26

failed suppose if this is true what I

play23:30

want to do I just want to display that

play23:33

okay connection that is connected

play23:37

successfully connections are applied

play23:40

successfully or databases are connected

play23:44

successfully fine now I have one more

play23:46

example that is okay same thing I'm

play23:50

writing the PHP code so Local Host

play23:55

username password

play23:58

okay fine now see here what I'm doing

play24:02

see I'm taking the connection so my SQL

play24:08

connect connections are established or

play24:10

not I'm checking so what are the thing

play24:13

I'm

play24:14

passing the server name then username

play24:18

and password if not connected okay if

play24:23

there is no connections are established

play24:25

I just want to display the message

play24:27

connection failed suppose if the

play24:30

connections are established successfully

play24:33

then what I want to do I want to display

play24:36

a message that connected

play24:39

successfully anyway dear student in this

play24:42

unit we just discussed how to access my

play24:47

SQL in my PHP so what is the subject

play24:51

name PHP and my SQL okay so how we can

play24:57

able to use

play24:59

PHP and

play25:01

MySQL to create Dynamic web page or to

play25:06

create Dynamic website anyway dear

play25:09

student in this session I started with

play25:13

what is

play25:14

myql how to use the MySQL and certain

play25:18

commands of

play25:20

MySQL anyway dear student this is all

play25:24

about the fifth unit and in the subject

play25:28

subject we had five different unit from

play25:33

this unit in the sense from each unit

play25:36

okay carries 12 12 marks okay in the

play25:39

final exam you can expect from each unit

play25:43

12 marks anyway dear student thank you

play25:47

for watching my session and thank you

play25:50

for encouraging me and let's meet in

play25:53

some other subject video until that keep

play25:57

watching Ing and keep learning thank you

Rate This
β˜…
β˜…
β˜…
β˜…
β˜…

5.0 / 5 (0 votes)

Related Tags
MySQLPHPDatabaseWeb DevelopmentDynamic WebProgrammingData ManagementEducationScript AnalysisTechnology