Web Application Development 1 - Final Quiz 1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Home / My courses /

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

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


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

Question 1
Incorrect

Mark 0.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)

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

Select one:
a. There are more values than fields

b. There are more fields than values

c. Nothing, everything is fine 

Question 2
Correct

Mark 1.00 out of 1.00

Insert into employee _____ (1002,Jeiven,2000);

In the given query which of the keyword has to be inserted ?

Select one:
a. Relation

b. Field

c. Table

d. Values 
Question 3
Correct

Mark 1.00 out of 1.00

Which of the following statements contains an error?

Select one:
a. Select empid from emp;

b. Select empid where empid = 1009 and lastname = ‘JOHANN; 

c. Select empid from emp where empid = 10006;

d. Select * from emp where empid = 10003;

Question 4
Correct

Mark 1.00 out of 1.00

The query given below will not give an error. Which one of the following has to be replaced to get the desired output?

Select ID, name, dept name, sal * 1.1

where instructor;

Select one:
a. ID

b. WHERE 

c. Instructor

d. sal *1.1

Question 5
Correct

Mark 1.00 out of 1.00

The "mysql_close()" function allows you to close a MySQL connection?

Select one:
True 

False
Question 6
Correct

Mark 1.00 out of 1.00

Which function used to get the current time in mysql?

Select one:
a. NOW() 

b. Time()

c. getTime()

Question 7
Correct

Mark 1.00 out of 1.00

This is Employee table.

Select * from employee where employee_id>1009;

Which of the following employee_id will be displayed?

Select one:
a. 1009, 1001, 1018

b. 1009, 1018

c. 1001

d. 1018 
Question 8
Correct

Mark 1.00 out of 1.00

A NULL value is treated as a blank or 0.

Select one:
True

False 

Question 9
Correct

Mark 1.00 out of 1.00

In a LIKE clause, you can could ask for any value ending in "qpt" by writing

Select one:
a. LIKE ^.*ton$

b. LIKE %qpt 

c. LIKE *ton

d. LIKE ton$

Question 10
Correct

Mark 1.00 out of 1.00

Function that select database.

Select one:
a. my_db_select();

b. mysql_select_db(); 

c. select_db();

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

Jump to...

W11: Lesson 9 PHP with Advanced MySQL - Module ►

You might also like