Unit-5 PHP and MySQL
Unit-5 PHP and MySQL
at a base, selecting a database, listing database, listing table names, creating a table, inserting data,
altering tables, queries, deleting database, deleting data and tables, PHP my admin and data base
bugs
1. Discuss database connectivity with PHP and MySQL including connection to server,
creating a database, selecting a database, listing database, listing table names, creating a
table, inserting data, altering tables, queries, deleting database, deleting data and tables.
(General topic coverage)
2. Write a PHP Script to add a user to the Login table in MySQL database. (AL Nov-2023)
3. Write the connectivity string in PHP with MySQL database. (CY May-2023) (CS June 2020)
5. Put in writing MYSQL database connectivity program using PHP. (CS Nov-2022)
6. Write a PHP script which takes the user’s name, password, and e-mail values from the user
and checks whether the user has filled the textboxes or not. Also, check the e-mail field
whether it is in the correct format or not. (CS June 2020)
5.
UNIT V: PHP and MySQL: Basic commands with PHP examples, Connection to server, creating
at a base, selecting a database, listing database, listing table names, creating a table, inserting data,
altering tables, queries, deleting database, deleting data and tables, PHP my admin and data base
bugs
PHP and MySQL
Basic Commands with PHP Examples (without code)
1. Connection to Server:
o Establish a connection to the MySQL server using server details like hostname, username,
and password.
o Check if the connection is successful or handle errors.
2. Creating a Database:
o Create a new database by executing a query.
o Confirm if the database was created successfully or handle errors.
3. Selecting a Database:
o Select an existing database to work with.
o Ensure the connection is established to the selected database.
4. Listing Databases:
o List all databases available on the server.
o Fetch and display the list of database names.
6. Creating a Table:
o Create a table within the selected database with specified columns and data types.
o Confirm the table creation or handle errors.
7. Inserting Data:
o Insert new records into a table.
o Confirm the data insertion or handle errors.
8. Altering Tables:
o Modify the structure of an existing table (e.g., adding a new column).
o Confirm the changes or handle errors.
9. Queries:
o Execute various SQL queries to interact with the database, such as SELECT, INSERT,
UPDATE, and DELETE.
o Retrieve and process the results of queries.
7. Discuss database connectivity with PHP and MySQL including connection to server,
creating a database, selecting a database, listing database, listing table names, creating a
table, inserting data, altering tables, queries, deleting database, deleting data and tables.
(General topic coverage)
8. Write a PHP Script to add a user to the Login table in MySQL database. (AL Nov-2023)
9. Write the connectivity string in PHP with MySQL database. (CY May-2023) (CS June 2020)
11. Put in writing MYSQL database connectivity program using PHP. (CS Nov-2022)
12. Write a PHP script which takes the user’s name, password, and e-mail values from the user
and checks whether the user has filled the textboxes or not. Also, check the e-mail field
whether it is in the correct format or not. (CS June 2020)
10.