PHP MySQL Basic Test

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By JAI KALE
J
JAI KALE
Community Contributor
Quizzes Created: 1 | Total Attempts: 3,366
| Attempts: 3,366 | Questions: 10
Please wait...
Question 1 / 10
0 %
0/100
Score 0/100
1. MySQL runs on which operating systems?

Explanation

MySQL is a widely used relational database management system that is compatible with various operating systems. It can run on Unix, Linux, Windows, and other operating systems. This makes it a versatile choice for different environments and allows users to choose the operating system that best suits their needs.

Submit
Please wait...
About This Quiz
PHP MySQL Basic Test - Quiz

This quiz assesses basic knowledge of PHP and MySQL, covering server-side scripting, database connections, SQL commands, and transaction handling.

2. PHP is Scripting language

Explanation

PHP is a server-side scripting language, which means that it is executed on the server before the webpage is sent to the client's browser. This allows PHP to interact with databases, process form data, and generate dynamic content on the server before sending it to the user. Unlike client-side scripting languages like JavaScript, PHP code cannot be viewed or modified by the client, making it more secure for handling sensitive data and server-side operations. Therefore, the correct answer is "Server Side".

Submit
3. Which of the following can add a row to a table?

Explanation

The INSERT statement is used to add a row to a table in a database. It allows the user to specify the values for each column in the new row, or to select values from another table to insert. The ALTER statement is used to modify the structure of a table, such as adding or removing columns, but it does not add rows. The ADD statement is not a valid SQL statement. The UPDATE statement is used to modify existing rows in a table, but it does not add new rows. Therefore, the correct answer is INSERT.

Submit
4. Transactions are used to treat sets of SQL statements atomically.

Explanation

Transactions in SQL are used to ensure that a set of SQL statements are executed as a single, indivisible unit. This means that either all the statements within the transaction are successfully executed, or none of them are executed at all. This helps maintain data integrity and consistency in the database. By treating a set of SQL statements atomically, transactions allow for rollback and recovery in case of failures or errors during the execution of the statements. Therefore, the given answer "True" is correct.

Submit
5. In PHP in order to access MySQL database you will use:

Explanation

The correct answer is mysql_connect() function. This function is used in PHP to establish a connection with a MySQL database. It takes parameters such as server name, username, password, and database name to establish the connection. Once the connection is established, it allows PHP to interact with the MySQL database and perform various operations such as querying, inserting, updating, and deleting data.

Submit
6. The ............. statement is used to delete a table.

Explanation

The DROP TABLE statement is used to delete a table.

Submit
7. Is [SQL is not case sensitive. SELECT is the same as select.] true or false?

Explanation

SQL is not case sensitive, meaning that the keywords and identifiers in SQL statements can be written in any case and will be treated the same. In this case, "SELECT" and "select" are considered equivalent and will produce the same result. Therefore, the statement "SQL is not case sensitive. SELECT is the same as select" is true.

Submit
8. Primary Key does allow the Null Values. where as in Unique key doesn't accept the Null values.

Explanation

The given statement is incorrect. In a database, a primary key does not allow null values, while a unique key does allow null values. A primary key is a column or a combination of columns that uniquely identifies each row in a table. It is used to enforce data integrity and ensure uniqueness. On the other hand, a unique key also enforces uniqueness but allows null values.

Submit
9. Following are Open Source Technologies

Explanation

PHP, MySQL, and Linux are all examples of open source technologies. Open source refers to software that is freely available to use, modify, and distribute. PHP is a popular scripting language used for web development, MySQL is a widely used open source database management system, and Linux is an open source operating system. These technologies have a large community of developers who contribute to their improvement and provide support, making them accessible and customizable for users. ASP.Net, on the other hand, is a Microsoft framework and is not open source.

Submit
10. DML Commands are

Explanation

The given list includes DML (Data Manipulation Language) commands, which are used to manipulate data in a database. "Update" is a DML command that allows modifying existing data in a table, while "select" is used to retrieve data from a table. Therefore, both "update" and "select" are correct answers as they are valid DML commands.

Submit
View My Results

Quiz Review Timeline (Updated): Jun 17, 2024 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Jun 17, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • Apr 21, 2020
    Quiz Created by
    JAI KALE
Cancel
  • All
    All (10)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
MySQL runs on which operating systems?
PHP is Scripting language
Which of the following can add a row to a table?
Transactions are used to treat sets of SQL statements atomically.
In PHP in order to access MySQL database you will use:
The ............. statement is used to delete a table.
Is [SQL is not case sensitive. SELECT is the same as select.] true or...
Primary Key does allow the Null Values. where as in Unique key doesn't...
Following are Open Source Technologies
DML Commands are
Alert!

Advertisement