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";
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";
Chapter12: Subqueries And Merge Statements
Section: Chapter Questions
Problem 6MC
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";](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F2ec814c7-90f3-4435-9bb8-fcbab3f733ac%2Fe451d44f-aa24-423f-a3a2-69080dbee8c0%2Fx4r6vtf_processed.png&w=3840&q=75)
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
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
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.Recommended textbooks for you
![Oracle 12c: SQL](https://www.bartleby.com/isbn_cover_images/9781305251038/9781305251038_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781305627482/9781305627482_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781285196145/9781285196145_smallCoverImage.gif)
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
![Oracle 12c: SQL](https://www.bartleby.com/isbn_cover_images/9781305251038/9781305251038_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781305627482/9781305627482_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781285196145/9781285196145_smallCoverImage.gif)
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](https://www.bartleby.com/isbn_cover_images/9781111527273/9781111527273_smallCoverImage.gif)
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr