0% found this document useful (0 votes)
815 views4 pages

Web Application Development 1 - Final Quiz 1

The document summarizes a student's final quiz on PHP and MySQL. The student answered 9 out of 10 questions correctly, earning a grade of 90% overall. The quiz covered topics like INSERT statements, connecting to databases, and functions for opening, closing, and querying databases.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
815 views4 pages

Web Application Development 1 - Final Quiz 1

The document summarizes a student's final quiz on PHP and MySQL. The student answered 9 out of 10 questions correctly, earning a grade of 90% overall. The quiz covered topics like INSERT statements, connecting to databases, and functions for opening, closing, and querying databases.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Home / My courses /

UGRD-IT6314-2037T /
Week 10: PHP and MySQL /
Final Quiz 1

Started on Thursday, 5 August 2021, 9:23 AM


State Finished
Completed on Thursday, 5 August 2021, 9:30 AM
Time taken 6 mins 49 secs
Marks 9.00/10.00
Grade 90.00 out of 100.00

Question 1
Correct

Mark 1.00 out of 1.00

Assuming the table and fields below exists, what is wrong with the following mysql query example:

mysql_query("INSERT INTO contacts (firstName, lastName, phoneNumber)

VALUES ('Robert', 'Smith', '123-983-2929')");

Select one:
a. There are more values than fields

b. Nothing, everything is fine 

c. There are more fields than values

Question 2
Correct

Mark 1.00 out of 1.00

The INSERT INTO statement is not used to add new records to a database table?

Select one:
True

False 


Question 3
Correct

Mark 1.00 out of 1.00

this function allows you to connect to mysql database

Select one:
a. connect();

b. mysql_connected();

c. mysql_connect(), 

d. mysqlconnect(),

Question 4
Correct

Mark 1.00 out of 1.00

The "or die()" part of a MySQL command will execute if the connection fails?

Select one:
True 

False

Question 5
Correct

Mark 1.00 out of 1.00

The "mysql_connect()" function opens a MySQL connection?

Select one:
True 

False

Question 6
Correct

Mark 1.00 out of 1.00

The "I" in MySQLi stands for

Select one:
a. improvement

b. improve

c. improved 

d. increase


Question 7
Correct

Mark 1.00 out of 1.00

Which of the following can add a row to a table?

Select one:
a. Alter

b. Add

c. Insert 

d. Update

Question 8
Incorrect

Mark 0.00 out of 1.00

This function allows you to close the current connection.

Select one:
a. close();

b. closed();

c. close_database();

d. mysql_close(); 

Question 9
Correct

Mark 1.00 out of 1.00

Select name, course_id from instructor, teaches where instructor_ID= teaches_ID; This Query can be replaced by which one of the following ?

Select one:
a. Select name, course_id from instructor natural join teaches; 

b. Select course_id from instructor join teaches;

c. Select name,course_id from teaches,instructor where instructor_id=course_id;

d. Select name ,course_id from instructor;


Question 10
Correct

Mark 1.00 out of 1.00

Which SQL statement is used to insert a new data in a database?

Select one:
a. INSERT NEW

b. ADD

c. UPDATE

d. INSERT INTO 

◄ W10: Lesson 8 PHP and MySQL - Video Lecture 9

Jump to...

W11: Lesson 9 PHP with Advanced MySQL - Module ►

You might also like