Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PHP/MYSQL Question assume you have productsDB database stored in MySQL server that contains the following 2 tables as follows: Table 1: products Table 2: user

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
PHP/MYSQL Question assume you have productsDB database stored in MySQL server that contains the following 2 tables as follows: Table 1: products Table 2: user Ratings ld int, Primary key, Auto Increment name int int, Primary Key, Auto Increment varchar(200) varchar(200) flo picture price userID productID rating int, FK with id in products int Sample user Ratings data Id la userID productID rating price 643.8 1 Sample product data name picture MAC Book Pro p5.jpeg Toshiba Laptop S70 p2.jpg 3 Sony Laptop XR p1.png 4 Samsung Laptop 10 p3.jpg 2 319.5 4 477.9 5 199.9 Use the following Connection.php by including it in your scripts which connect you to MySQL server and the database. setAttribute(PDO::ATTR ERRMODE, PDO::ERRMODE EXCEPTION); Implement viewRated Products.php as follows: the script should display all rated products only in a table view, showing only two products per row. Each product details should contains product's name, picture, price, rating as stars and number of ratings as shown in the sample output. Your script should generate a valid HTML code without any missing tag. Use the following pictures to create 5 star rating scale for each product. Use PHP round() function to round the average rating to nearest integer (i.e.round(3.4) will return 3) checkedStar.png emptyStar.png Sample Output MAC Book Pro Sony Laptop XR SONY BD 643.9 BD 477.9 (Based on 3 rating(s)(Based on 1 rating(s)) Toshiba Laptop S70 TOSHIBA BD 319.5 (Based on 2 rating(s))

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

Database Systems An Application Oriented Approach Complete Version

Authors: Michael Kifer, Arthur Bernstein, Richard Lewis

2nd Edition

0321268458, 978-0321268457

More Books

Students also viewed these Databases questions