Question: Table Name: STUDENT snum sname course year gender bdate 200912345 Angus Maximus Information Technology 3 M 1993-05-04 200912333 Prism Queen Information Technology 3 F 1994-02-07

Table Name: STUDENT

snum

sname

course

year

gender

bdate

200912345

Angus Maximus

Information Technology

3

M

1993-05-04

200912333

Prism Queen

Information Technology

3

F

1994-02-07

200820111

Ice Crown

Computer Science

4

F

1992-08-01

200811101

Valesti Knight

Information Technology

4

M

1992-06-08

201035600

Surge Seoul

Computer Science

2

M

1995-09-12

201055558

Dark Savior

Computer Engineering

0

1994-12-04

201165844

PyrusLyllwin

Computer Science

1

F

1995-10-10

5. What is the output of the code below? $q = mysql_query("SELECT DISTINCT(course) FROM student WHERE gender='F'"); $r = mysql_affected_rows(); echo $r; -OR- $q = mysqli_query("SELECT DISTINCT(course) FROM student WHERE gender='F'", $dbconnect); $r = mysqli_affected_rows(); echo $r;

1

2

3

4

6. What is the output of the code below? $q = mysql_query("SELECT sname FROM student WHERE course='Computer Science' ORDER BY year"); $r = mysql_result($q,2); echo $r; -or- $q = mysqli_query("SELECT sname FROM student WHERE course='Computer Science' ORDER BY year", $dbconnect); $r = mysqli_result($q,2); echo $r;

Prism Queen

Ice Crown

Surge Seoul

PyrusLyllwin

7. What is the output of the code below? $q = mysql_query("SELECT MAX(course) FROM student HAVING MAX(year)"); $r = mysql_result($q,0); -or- $q = mysqli_query("SELECT MAX(course) FROM student HAVING MAX(year)", $dbconnect); $r = mysqli_result($q,0);

Computer Engineering

Computer Science

Information Technology

Error

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!