5/2/24, 1:39 AM PHP + MySQL | Quizizz
Worksheets Name
PHP + MySQL
Class
Total questions: 25
Worksheet time: 13mins
Date
Instructor name: Mrs. Monika Steinberg
1. What does PHP stands for?
a) Personal Hypertext Processor b) Private Home Page
c) PHP: Hypertext Preprocessor
2. Which among the following is the correct delimiters that surround PHP server scripts?
a) <script>...</script> b) <&>...</&>
c) <?php...?> d) <?php>...</?>
3. How do you get information from a form that is submitted using the "get" method?
a) $_GET[]; b) Request.QueryString;
c) Request.Form;
4. When using the POST method, variables are displayed in the URL:
a) True b) False
5. What is the correct way to add 1 to the $count variable?
a) ++count b) $count++;
c) count++; d) $count =+1
6. How do you create an array in PHP?
a) $cars = "Volvo", "BMW", "Toyota"; b) $cars = array("Volvo", "BMW", "Toyota");
c) $cars = array["Volvo", "BMW", "Toyota"];
7. The if statement is used to execute some code only if a specified condition is true
a) True b) False
https://quizizz.com/print/quiz/5d14986fddc30a001a6a7ef0 1/6
5/2/24, 1:39 AM PHP + MySQL | Quizizz
8. How is PHP written into a webpage?
a) A PHP script starts with <?php and ends b) Only in a separate file which is linked to the
with ?> html page
c) Using curled brackets {php} {/php} d) Just like other html tags: <php> </php>
9. PHP script is parsed....
a) On the client's CPU b) On the Internet
c) On the server where the website is hosted d) On the client's web browser
10. PHP is case sensitive in what way?
a) It's never case sensitive, don't worry about b) All the time!
it.
c) When referring to classes, functions or d) Only when referring to variables
variables
11. When concatenating strings, you use what symbol in PHP?
a) A plus sign + b) a hyphen -
c) A comma , d) a full stop .
12. Which statement can be used to select the database?
a) $mysqli->select_db('databasename'); b) mysqli=select_db('databasename');
c) mysqli->select_db('databasename'); d) $mysqli=select_db('databasename');
13. The updated MySQL extension with PHP5 is typically referred to as
a) MySQL b) mysqli
c) mysqly d) mysql
14. Which method returns the error code generated from the execution of the last MySQL
function?
a) errno() b) errorno()
c) errnumber() d) errornumber()
https://quizizz.com/print/quiz/5d14986fddc30a001a6a7ef0 2/6
5/2/24, 1:39 AM PHP + MySQL | Quizizz
15. Which one of the following methods can be used to diagnose and display info about a MySQL
connection error?
a) mysqli_connect_error() b) connect_error()
c) connect_errno() d) mysqli_connect_errno()
16. Which method is responsible for sending the query to the database?
a) sendquery() b) query()
c) send_query() d) query_send()
17. How can we get the number of records or rows in a table?
a) Using NUM b) Using COUNT
c) Both a and c above d) Using NUMBER
18. USE keyword is used to select a ____________________
a) Database b) Table
c) Column d) None of the above
19. Which is the default order of sort in ORDER BY clause?
a) Descending b) Ascending
20. A relational database ___________ is a data structure used to store and organize information.
a) View b) Table
c) Report d) Stored Procedure
21. What is the maximum size of the VARCHAR Column type?
a) 512 Byte b) 512 Char
c) 255 Byte d) 255 char
22. MySQL is
a) None of the Above b) A Relational Database Management
System
c) A technique for writing reliable programs d) A Programming language
https://quizizz.com/print/quiz/5d14986fddc30a001a6a7ef0 3/6
5/2/24, 1:39 AM PHP + MySQL | Quizizz
23. What SQL clause is used to restrict the rows returned by a query?
a) FROM b) HAVING
c) WHERE d) AND
24. Which will input data into a table?
a) INSERT INTO table CATEGORIES(name, b) INSERT INTO table(name, height, weight)
height, weight) ('strand', '6ft 2in', '165') VALUES('strand', '6ft 2in', '165')
c) INPUT INTO table(name, height, weight) d) INSERT INTO table CATEGORIES(name,
VALUES('strand', '6ft 2in', '165') height, weight) VALUES('strand', '6ft 2in',
'165')
25. If I want to show all data in a MySQL table, I would use
a) SHOW * IN table; b) SELECT * IN table;
c) SELECT * FROM table; d) SHOW * FROM table;
https://quizizz.com/print/quiz/5d14986fddc30a001a6a7ef0 4/6
5/2/24, 1:39 AM PHP + MySQL | Quizizz
Answer Keys
1. c) PHP: Hypertext 2. c) <?php...?> 3. a) $_GET[];
Preprocessor
4. b) False 5. b) $count++; 6. b) $cars = array("Volvo",
"BMW", "Toyota");
7. a) True 8. a) A PHP script starts with 9. c) On the server where the
<?php and ends with ?> website is hosted
10. d) Only when referring to 11. d) a full stop . 12. a) $mysqli-
variables >select_db('databasename');
13. b) mysqli 14. a) errno() 15. d) mysqli_connect_errno()
16. b) query() 17. b) Using COUNT 18. a) Database
19. b) Ascending 20. b) Table 21. d) 255 char
22. b) A Relational Database 23. c) WHERE 24. b) INSERT INTO
Management System table(name, height,
weight)
VALUES('strand', '6ft
2in', '165')
25. c) SELECT * FROM table;
https://quizizz.com/print/quiz/5d14986fddc30a001a6a7ef0 5/6
5/2/24, 1:39 AM PHP + MySQL | Quizizz
https://quizizz.com/print/quiz/5d14986fddc30a001a6a7ef0 6/6