Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 4 MySQL/PHP Assume you have an ORDERS database stored in MySQL server that contains the following tables with unknown number of rows Tablet customer_orders

image text in transcribed
image text in transcribed
Question 4 MySQL/PHP Assume you have an ORDERS database stored in MySQL server that contains the following tables with unknown number of rows Tablet customer_orders Table: order_Items Name Type Name Type 1 id int(11) id int(11) 2 username varchar(100) orderid int(11) 3 datetime datetime productid int(11) 4 status varchar(100) qty int(11) Note: ordered is a foreign key to an id in customer_orders Sample Data Table: customer_orders Table: order_items id username datetime status id orderid productid aty 1 1 2 1 1 falqaed 2021-11-04 00:00:00 Order Placed 2 1 5 2 noor 2021-11-04 00:00:00 Order Placed 3 1 3 1 1 4 1 2 2 5 2. 5 1 6 2 Use the following connection.php by including it in your scripts, which connects you to MySQL server and the database. Refer to Question 4 for Database Details 04-B: Write the required PHP statements to display all users orders in an HTML Table as follows: Username Order Date Time Number of Items Total Qty Order Status falqaed 2021-11-04 00:00:00 4 4 Order Placed noor 2021-11-04 00:00:00 2 3 Order Placed Note that Number of Items is the number of different products in one order, while Total Qty is the sum of all quantities inside one order. Tip: use SQL Group By and built-in functions like count and sum

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

Relational Database Design A Practical Approach

Authors: Marilyn Campbell

1st Edition

1587193175, 978-1587193170

More Books

Students also viewed these Databases questions

Question

=+derived from the assignment will balance the costs?

Answered: 1 week ago