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

What's the output of the codes below?

1. $q = mysql_query("SELECT COUNT(year) FROM student"); $r = mysql_result($q,0); -or- $q = mysqli_query("SELECT COUNT(year) FROM student", $dbconnect); $r = mysqli_result($q,0);

6

7

8

error

2. What is the output of the code below? $q = mysql_query("SELECT COUNT(gender) FROM student"); $r = mysql_result($q,0); -or- $q = mysql_query("SELECT COUNT(gender) FROM student"); $r = mysql_result($q,0);

6

7

8

error

3. What is the output of the code below? $q = mysql_query("SELECT COUNT(gender) FROM student WHERE gender='M'"); $r = mysql_affected_rows(); echo $r; -or- $q = mysqli_query("SELECT COUNT(gender) FROM student WHERE gender='M'", $dbconnect); $r = mysqli_affected_rows(); echo $r;

4

3

2

1

4. What is the output of the code below? $q = mysql_query("SELECT COUNT(year) FROM student"); $r = mysql_num_rows($q); -or- $q = mysqli_query("SELECT COUNT(year) FROM student", $dbconnect); $r = mysqli_num_rows($q);

6

7

8

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

How Do I Use A Database Research Tools You Can Use

Authors: Laura La Bella

1st Edition

1622753763, 978-1622753765

More Books

Students also viewed these Databases questions

Question

What are the main benefits of classroom training?

Answered: 1 week ago

Question

What is RAM as far as telecommunication is concerned?

Answered: 1 week ago

Question

Question 1: What is reproductive system? Question 2: What is Semen?

Answered: 1 week ago

Question

Describe the sources of long term financing.

Answered: 1 week ago