Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Guide To Client Server Databases

Authors: Joe Salemi

2nd Edition

1562763105, 978-1562763107

More Books

Students also viewed these Databases questions

Question

=+ 9. What is inflation and what causes it?

Answered: 1 week ago

Question

=+6. What does the invisible hand of the marketplace do?

Answered: 1 week ago