TN Online TestSamacheer Kalvi practice

12th Standard Computer Applications — Connecting PHP and MYSQL: Book Back MCQs with Answers & Explanations

Share this chapter: Telegram

Every Book Back multiple-choice question from Connecting PHP and MYSQL (12th Standard Computer Applications, Samacheer Kalvi) — each with the correct option highlighted and a clear, worked explanation. Free to read in English and Tamil.

Answer key at a glance

Q1
Which is the correct function to execute the SQL queries in PHP ?
  • A. mysqli_query("Connection Object","SQL Query")Correct
  • B. query("Connection Object","SQL Query")
  • C. mysql_query("Connection Object","SQL Query")
  • D. mysql_query("SQL Query")
Explanation. The mysqli_query() function is used to execute SQL query statements in PHP. It requires the connection object and the SQL query string as parameters.
Q2
Which is the correct function Closing Connection in PHP ?
  • A. mysqli_close("Connection Object");Correct
  • B. close("Connection Object");
  • C. mysql_close("Connection Object");
  • D. mysqli_close("Database Object");
Explanation. The mysqli_close() function is used to close an active database connection between PHP and the MySQL database server using the connection object.
Q3
Which is the correct function to establish Connection in PHP ?
  • A. mysqli_connect("Server Name ","User Name","Password","DB Name");Correct
  • B. connect("Server Name ","User Name","Password","DB Name");
  • C. mysql_connect("Server Name ","User Name","Password","DB Name");
  • D. mysqli_connect ("Database Object");
Explanation. The mysqli_connect() function establishes a connection to the database server. It requires database server name, username, password, and database name as parameters.
Q4
Which is the not a correct MySQL Function in PHP ?
  • A. Mysqli_connect() Function
  • B. Mysqli_close() Function
  • C. mysqli_select_data() FunctionCorrect
  • D. mysqli_affected_rows() Function
Explanation. The function mysqli_select_data() is not a valid PHP MySQLi function. The correct database selection function in PHP is mysqli_select_db().
Q5
How many parameter are required for MYSQLi connect function in PHP ?
  • A. 2
  • B. 3
  • C. 4Correct
  • D. 5
Explanation. The mysqli_connect() function requires four parameters to connect: the database server name, database username, password, and the database name.
Q6
How many parameter are required for MYSQLi query function in PHP ?
  • A. 2Correct
  • B. 3
  • C. 4
  • D. 5
Explanation. The mysqli_query() function requires exactly two parameters: the database connection object and the SQL query statement string.
Q7
How many parameter are required for MYSQLi Close function in PHP ?
  • A. 1Correct
  • B. 2
  • C. 3
  • D. 5
Explanation. The mysqli_close() function requires exactly one parameter, which is the database connection object that needs to be closed.
Q8
Which version of PHP supports MySQLi fuctions ?
  • A. Version 2.0
  • B. Version 3.0
  • C. Version 4.0
  • D. Version 5.0Correct
Explanation. The MySQLi extension, which supports MySQL database access and queries, was introduced in PHP Version 5.0.
Q9
According to the points to remember, what percentage of websites has been built using PHP and MySQL?
  • A. 50%
  • B. 60%
  • C. 70%Correct
  • D. 80%
Explanation. The points to remember in the textbook note that seventy percent of websites are built using PHP and MySQL.
Q10
Which PHP function is used to find the number of rows returned from a MySQL query execution?
  • A. mysqli_num_rows()Correct
  • B. mysqli_affected_rows()
  • C. mysqli_fetch_array()
  • D. mysqli_connect_error()
Explanation. The mysqli_num_rows() function is used in PHP to get the number of rows returned from a database query execution.
Take the Book Back practice test → Open the app

More for this chapter

Additional MCQs15 extra MCQs · solved Practice TestInteractive · instant score Book Back TestTest yourself on the textbook set Additional MCQ TestTest yourself on the extra set Study NotesConcepts & methods Formula SheetAll key formulas

About these Connecting PHP and MYSQL questions

These are the Book Back multiple-choice questions for Connecting PHP and MYSQL from the Tamil Nadu State Board (Samacheer Kalvi) 12th Standard Computer Applications syllabus. Each question shows the correct option and an original, step-by-step explanation so you understand the method, not just the answer. Use the answer key above to jump to any question, then take the practice test to check yourself under exam-like conditions.

Frequently asked questions

How many MCQs are there in Connecting PHP and MYSQL?

This chapter has 10 book-back multiple-choice questions, each with the correct answer and a step-by-step explanation.

Are these 12th Standard Computer Applications MCQs free to practise online?

Yes. Every question, answer and explanation here is free, and you can also take them as a timed practice test.

Where can I find the Connecting PHP and MYSQL book-back answers?

The correct option for each question is highlighted on this page with a worked explanation, plus a quick answer-key summary at the top.

More chapters in Computer Applications

View all
1 Multimedia 2 An Introduction to Adobe PageMaker 3 Introduction to Database Management System 4 PHP: Hypertext Preprocessor 5 Functions and Arrays in PHP 6 Conditional Statements in PHP 7 Loops in PHP 8 Forms and Files 10 Introduction to Computer Networks 11 Network Examples and Protocols 12 Domain Name System (DNS) 13 Network Cabling 14 Open Source Concepts 15 E-Commerce 16 Electronic Payment Systems 17 E-Commerce Security Systems 18 Electronic Data Interchange- EDI