2 like 0 dislike
There is a table named `books` with five field which are `serial` `book_name` `author` `price` and `publisher` and another table named `comment` with two field which are `serial` and `content`. The `comment`.`serial` is connect to the `books`.`serial`. Please write a php script to list all books and its comment count.
[Exercise] Essay (Open question) - asked in 2016-2 CSIEB0270 - Internet System Design and Practice by (18k points)
Available when: 2017-06-15 09:30:00 - Due to: 2017-06-15 12:00:00

reshown by | 55 views
0 0
Called for Help

11 Answers

0 like 0 dislike
Hidden content!
* ** ** html>
** ** *** * *
** * **
* * * * * * * * * * * * **** ** * * *
* *** ** *** * *** ** ** *** * * ** * * ** * * ** />
* * * ** ** **
** * *
******* ** ** * * * * *** ** *
* ** **** ** * **** * *** *** * ** * * * * * * * />
** **** * **
* * ****
***** * * * * ** * * ** * * ** ***
* *** * **** ** *** * ** ** *** * * ***** * *** />
* ** *
*** *
* *** ** **** * * *** * ** ********
* * ** ** **** ***** * * * *** ** * * * * * ** * * * ** ** **
** * * *
** *** * **
** * **** *** *** ** ** * * * ** />
* * * * ** * **** *** * **** * />
** *** *
* * **
* * * * *
* ** **
** * **
if ** ** * * **
* * * *** * * ** **
exit();
}
?>

* *
if * **** *** * **
echo * * * * *** * * * * **
}else{
* ** ** * ** * ** ***** ?>
** * ** * * ** **
** ** **
** * * ** * * echo *** * ?>'s *** * * * ****

** * * ** ** ** * * *** * ******* * * * * **** ****** * * *
* ** ***
* * * * ** *
* * *** * *** ** * ** * *
******* echo * **** * * ?>

<a * ** * * ** * ** * ** * *
** *** * *
<div * * ** * * ***
** **** * * include 'nav.php' ?>
* * * * * **
****** * **
** * **
answered by (-233 points)
0 like 0 dislike
Hidden content!
**** * ** ** * * * * ***** * * **** *
answered by (-32 points)
0 like 0 dislike
Hidden content!
* * ***** * **** * ***** * * * * *** *
answered by (-61 points)
0 like 0 dislike
Hidden content!
***
**** * = **** * * ** * FROM * *
* = * ****** **


** ($row = * * **** * {
* ** * = **
* *** *** *** as **** {
** ** = * **** . * * ** * * * * . * * * * . * ** . * ** *

}


* = * * * *** INTO ** * * ** **** * * *** * **
.= * ', ** *


** * *** * *

}
* * **
answered by (157 points)
0 like 0 dislike
Hidden content!
<!DOCTYPE html>

<html>

    <head>
* * ** ** *** * * ** ** ** ** ** *** * *** *** * * *** 3</title>

        

    </head>

    <body>

        <?php
* * ****** ** **** * ** * * *** ** * * ** *** ** ***** **** * *** ***
* ** * ** * ** * * ** *** *** *** * * ******* * * * * * * * ** ** * **
* * * ** ** ****** ** * ***** *** **** ** * * ** * ** **** * * ** **
** * **** ****** * *** ** * * * * * ** * * ** *** * * * ** * ** *** * *

        
* *** * ** *** **** ** ** * * * * *** *** ** ** * ** * ** * = @mysqli_connect($host,$username,$password,$db);
* *** * ** * * ** * * ** * * **** * * ** ** *** **** * (!$try1)
** * *** ** ** ***** ******* ***** * *** ** ** ** *** **
** * * ** * ** ** ** * * *** * * * ** * ** * * *** * **** * *** * * * *** ** ** ** not connect: '.mysqli_error($try1));
** *** * * * ** **** ****** * * ** * * * *** * * * * * * *
****** *** ***** ** * ** * * * ** ** ** ** * * ** * ***** * * mysqli_select_db($con,"students");
*** * * * * **** * * * * ** ** * ** ** *** *** *** * *** * books.serial, books.book_name, books.author, books.price ,COUNT(coment.comment) AS COMMENTS FROM coment

LEFT JOIN books on coment.Serial=books.serial

GROUP BY serial";
*** * * ** ****** *** **** ***** ** ***** * ** ** * * * ** ** * * ** ** * * * **

        
* * **** * * * ***** *** *** * ** *** * ** *** ** **** * * ** * * * "<table>
*** ** ** ***** ** * * ** ** * **** * ** ** * * *** ** * ** * ** ** * * ** * *** ********** **
** ** * ** ** * ****** ******* ** *** * *** * ** **** ** * * ** ** * ** * **** * ** *** ** *** **** ***
*** ** * * * * * * ** * ** **** * **** * ** * *** * *** ***** *** ** * ** * * * * **** * ** Name</th>
* *** **** * * * * ***** ***** * * ** * ** * ** *** ** ***** * ** ***** * ** * * * ** *** ** ** ** ** *
** ** *** ** ** *** * * * ** ** * * ** * ** ** * * * * ** *** * * ** *** * * * *** * * * * * ** ** *
*** ***** ********* ***** * *** ** * *** * * ** * *** ** * * ***** * * ** * ** *** ** *** ** **** ** * * ** ** * **
* ** * * *** ** *** ** * * * ** * ** * * * ** * ***** * * ** *** *** **** * * *** ** * ****** ** **
** **** ** * *** ** ** * **** * * ** *** ** *** * ** *** * ** ** * * (!$result)
** * * ** ** *** ** * * * * *** * ** * * * * * *** ***** *** **
* ** ** * **** *** * * * *** * * * ****** * * * * * ** ** * * ** * *** ** * * ***** "Error: ".mysqli_error($con);
** * * *** * *** ** * ** * ******* * * * ** ** * * ** * * * *** *** ** * * * * *** * *** **
* * * * * * ** * *** *** * ** * ****** ******* *** * * * * *
* ** * **** *** ** * * *** * * ** * * ** ** ** * * ****** **** * *** ($row=mysqli_fetch_array($result))
** ** * * * ** ***** ** * * *** ** ****** *** * * ** * * * *
* *** **** *** * * *** * * ****** * ** ** * *** ******** **** ** ** ** * * ** * "<tr>";
* *** * **** * * * * * *** ** *** * ** * * *** * * ** **** *** * * ** * ***** ** * * * *** *** * * * *** *** * * ** *** ** ** ** *
* ** * **** ** * * ** ** ** * ** * * ** * * ** * * ** * ** ** ** * ** ** * *** * ** * * ***** ** * * * ** *** * ** ** * *** *
**** * * * * * * ** * * * *** ** ** ***** * ***** ** * * * * * ****** **** * * * * * * * * **** * * **** * * ***** * *
** * **** * * **** * *** * * * ** * ** * * ** * ******* * *** ** * * ** *** "<td>".$row['price']."</td>";
* * * * *** ***** ** ** ** ** **** *** **** * * * ** ****** *** * * ** * *** ** ** * * * * ***** *** * * ** * ** * *** *** *** * ** * * ***
* ** * ** *** * *** *** * * * ** **** * ** * *** ** ** ** * * * * ** * ** * ***** ** ** ** ***** "</tr>";
* * ** ** * **** ** ** * * ** ** * * ***** *** * ***
** ** **** * * ** * *** ** * ** ** **** * **** ***** * * "</table>";
*** * *** * ** ** *** *** *** **** *** ** * * ** **** * **** ($con);

    </body>



</html>
answered by (30 points)
0 like 0 dislike
Hidden content!
<!DOCTYPE html>

<html>

    <head>
** *** * ** ***** * ** * * * *** * * ** * * ** * * ** #3</title>

        

    </head>

    <body>

        <?php
* * * * * *** * * * * *** * * * * *** * * ** * * *** * ** * *
* * * * *** * **** ** * * ** **** * * **** *** * * ** * * * ***
** * ** *** *** ** * ** *** ** *** **** **** * * ** *** **** * * *
** *** ** * * * * ** * *** ** *** *** **** ** * * ** * * * * ** * *

        
* ** ***** ***** * * * * * ** *** *** * * * * ** ** * = @mysqli_connect($host,$username,$password,$db);
** * *** **** ** ** * * * ** * * * * * ****** * ** ** * ** *** ** (!$con)
*** ***** * * * *** *** **** ** *** *** *** * *** ** * *****
* * * ***** ** * ** ** * ** **** **** *** ** **** **** **** * ** *** * **** * * * * *** not connect: '.mysqli_error($con));
* ** * * ****** ** * * ** * * * ** * *** *** * * ** ** * * *
* * ***** ** * ** **** ***** ** * * * ** ** * * ** * * *** * ** books.serial, books.book_name, books.author, books.price ,COUNT(coment.comment) AS COMMENTS FROM coment

LEFT JOIN books on coment.Serial=books.serial

GROUP BY serial";
* * * * *** *** ** **** * * **** ** * * ** **** ** * ***** * * **** ** ** ** * * ****

        
*** * ** * * * ** * **** * *** ** * * * * * ***** * **** *** ** "<table>
* * ***** ** * * *** ** * * * * * ** * ** * ** ** * ** * * * **** *** * * ** * ** * ***** **** * ** *
* *** * ** ** *** ** **** * * * * *** * ****** ***** * *** * * * * ** * * * * *** ** **** * * *
*** * *** ** **** * ** ** * *** ** * * * * ***** *** ** * **** * *** * *** * * ** * * ** * * * *** Name</th>
* * ****** * * * ****** ***** * * ** * *** ** * ***** *** * ** * *** * **** ** * *** * * * **
** * ** * * * * ** **** *** * * * **** ** * * * * * * * ** * ***** * * ** ** *** ** ****** * *****
** * ** ** ** * ** * * ** * *** ** ** ** * * *** * * *** * *** ** *** * * * * ** ** * ** * ******
* * * *** *** * * * * ***** * * ** * ***** ** * **** * * * ** **** * * *** ** * * * *** ** ** **
*** ** * * * ** * *** * ** ** ***** * ***** ** * ** (!$result)
** * ** ** * * **** * * * * ** **** * ** * ***** ** **
* * * * *** * *** **** * * * ** ** *** * ****** * * ** ** ** ** *** *** * ** * **** ** "Error: ".mysqli_error($con);
* * * ** * **** * * ***** * * **** ** ** **** *** ** * * ** * * ** * * ** *** * * *
** *** ** * * * ** ** ** ** ********* ** * * * * * **** ** **
** *** * ** ** * ** * * **** **** ** * * * *** * ** * * ** ** * ** ($row=mysqli_fetch_array($result))
* ** * * ** * *** * ** **** * * ** ** * ** * ** * ** * **** **** *
**** * * ** **** * ** * *** ** * ** * ** * * * * ** ** **** **** **** ******** ** * * "<tr>";
* *** * * * *** * * **** * **** * * * *** ***** * ** ***** * ** * * * * * * **** ****** *** *** *** * * * **** * ** * ** * * **** ** ** *
* * * * * * * * * ** * *** * ***** * * * *** ** *** * * * * *** * ** *** * * * * ** ** * * ** * * * ** * * ** ** **
* ** ** * * ** *** * * ** ** *** *** * ** ** ** * * ** * **** *** *** * *** ***** *** * * * ** * ** * ******* ***** * * * *****
** * * ** ** * ***** **** * ** ** * *** ** ** * * **** *** * ** * * *** * * * "<td>".$row['price']."</td>";
** * * *** ** *** * * *** * * ** ** * *** * ** ** **** ** * * * * ** ** ** * * ***** ** * * * * **** * ** * ** * ** *** * ** * * * *** * *
* * * *** * **** * * ** ** *** ** ** * ** * **** * ***** ***** * * *** * * * * ** * "</tr>";
*** * * ** * **** ** * *** ** ****** * * * ************** ** * ********
*** ***** *** ******* *** * *** ** * ****** **** ***** **** * *** "</table>";
* **** ****** ****** * ** * * ** * * * * ** ** * *** * ** ** * ** ($con);

    </body>



</html>
answered by (-168 points)
0 like 0 dislike
Hidden content!
* ** * * * * ** *** ** * ** * * * *
answered by (-335 points)
0 like 0 dislike
Hidden content!
********** ****** * * * * * * * * **
answered by (-144 points)
0 like 0 dislike
Hidden content!
* * * * * * * * ** * ** *** * * * ***
answered by (16 points)
0 like 0 dislike
Hidden content!
****
*** = ** * * * ** * * ***
* * = *** ********
* * * * = *** ** *** **** * {
***** = *
* ** *** * * * * * as * ** {
* *** = ** ** ** . ** * ********* . ** * ** . * ***** . * * ** ** *
}

* * ** = ****** * * * ** * * * ** * * *
* ** *** *** * **

* * ** ****
}
* ***
answered by (-434 points)
Get it on Google Play Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.69.69.10
©2016-2019

Related questions

1 like 0 dislike
14 answers
[Exercise] Essay (Open question) - asked Jun 15, 2017 in 2016-2 CSIEB0270 - Internet System Design and Practice by Shun-Po (18k points)
Available when: 2017-06-15 09:30:00 - Due to: 2017-06-15 12:00:00
| 28 views
3 like 0 dislike
23 answers
[Exercise] Essay (Open question) - asked Jun 15, 2017 in 2016-2 CSIEB0270 - Internet System Design and Practice by Shun-Po (18k points)
Available when: 2017-06-15 09:30:00 - Due to: 2017-06-15 12:00:00
| 13 views
3 like 0 dislike
20 answers
[Exercise] Essay (Open question) - asked Jun 15, 2017 in 2016-2 CSIEB0270 - Internet System Design and Practice by Shun-Po (18k points)
Available when: 2017-06-15 09:30:00 - Due to: 2017-06-15 12:00:00
| 15 views
3 like 0 dislike
23 answers
[Exercise] Essay (Open question) - asked Jun 15, 2017 in 2016-2 CSIEB0270 - Internet System Design and Practice by Shun-Po (18k points)
Available when: 2017-06-15 09:30:00 - Due to: 2017-06-15 12:00:00
| 11 views
2 like 0 dislike
24 answers
[Exercise] Essay (Open question) - asked May 17, 2017 in 2016-2 CSIEB0270 - Internet System Design and Practice by Shun-Po (18k points)
Available when: 2017-05-18 09:30:00 - Due to: 2017-05-18 12:00:00
| 21 views
8,045 questions
60,931 answers
33,050 comments
1,170 users