Please refer to the table in the dreamhome database. If the connection is successful and we run the following PHP codes on obi.kean.edu, which statement. is TRUE? 1 Cannot connect to DB\n"); 5 $query = "SELECT fname from dreamhome. Staff where sex= 'FF' and salary > 20000"; 6 $result = mysqli_query($con, $query); 7 if($result) { 8 9 10 11 if (mysqli_num_rows($result)>0) echo "Monkey\n"; else echo "Tiger\n"; 12} 13 else 14 15 16 mysqli_close($con); 17 ?> echo "Dog\n";

Oracle 12c: SQL
3rd Edition
ISBN:9781305251038
Author:Joan Casteel
Publisher:Joan Casteel
Chapter12: Subqueries And Merge Statements
Section: Chapter Questions
Problem 6MC
icon
Related questions
Question
Please refer to the table in the dreamhome database. If the connection is successful and we run the following PHP codes on obi.kean.edu, which statement
is TRUE?
1 <?php
2 include "dbconfig.php";
3 $con=mysqli_connect($hostname, $username, $password, $dbname)
4
or die("<br>Cannot connect to DB\n");
5 $query = "SELECT fname from dreamhome. Staff where sex= 'FF' and salary > 20000";
6 $result = mysqli_query($con, $query);
7 if($result) {
8
9
10
11
12 }
13 else
14
15
16 mysqli_close($con);
17 ?>
if (mysqli_num_rows($result)>0)
echo "Monkey\n";
else
echo "Tiger\n";
echo "Dog\n";
Transcribed Image Text:Please refer to the table in the dreamhome database. If the connection is successful and we run the following PHP codes on obi.kean.edu, which statement is TRUE? 1 <?php 2 include "dbconfig.php"; 3 $con=mysqli_connect($hostname, $username, $password, $dbname) 4 or die("<br>Cannot connect to DB\n"); 5 $query = "SELECT fname from dreamhome. Staff where sex= 'FF' and salary > 20000"; 6 $result = mysqli_query($con, $query); 7 if($result) { 8 9 10 11 12 } 13 else 14 15 16 mysqli_close($con); 17 ?> if (mysqli_num_rows($result)>0) echo "Monkey\n"; else echo "Tiger\n"; echo "Dog\n";
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Single Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr