
<html>
<head><title>ViewCustomer</title>
</head>
<body>
<table width="100%">
<?php
session_start();
$supidd=$_POST['supid']; //assigning supid received from the
sup_id.html to the php variable supidd
$db=new mysqli('localhost','root','','sunnysdiner'); //connection
request
if (!$db) //to check whether the connection is established or
not
die("Connection failed: " . mysqli_connect_error());
else
{
$sql="SELECT *FROM supplier WHERE SUP_ID='$supid'";//retriving the
row from the table supplier that matches with sup_id entered by the
user
}
$result=mysqli_query($db,$sql);
if (mysqli_num_rows($result) > 0) //if there are multiple
rows
{
echo "<tr><th>food_item</th>
<th>SUP_ID</th>
<th>Address</th>
<th>city</th>
<th>state</th>
<th>zipcode</th>
<th>country</th>
<th>phone</th>
<th>price</th>
</tr>"."<br>"; //displaying results in table
while($row = mysqli_fetch_assoc($result))
{
echo
"<tr><td>".$row["food_item"]."</td><td>".$row["SUP_ID"]."</td><td>".$row["address"]."</td><td>".$row["city"]."</td><td>".$row["state"]."</td><td>".$row["zipcode"]."</td><td>".$row["country"]."</td><td>".$row["phone"]."</td><td>".$row["price"]."</td>";
}
}
else
{
echo "<h1>0 results</h1>";
}
mysqli_close($db); //closing database connection
?>
</table>
</body>
</html>
CODE SCREENSHOTS:
![<html> <head><title>ViewCustomer</title> </head> <body> <table width=100%> <?php session_start(); $supidd=ş_POST[supid];](http://img.homeworklib.com/questions/c964aa20-5838-11eb-9dd7-b31c4b023e3a.png?x-oss-process=image/resize,w_560)
already created table now need php and html Write SQL statements to delete the above table....
SQL problem solving help; First 3 tables are finnished; Need
help understanding on how to do steps after.
First 3 tables are after the first 2 images for reference if
needed.
//1//
CREATE TABLE kr_customer (
Name VARCHAR(40) NOT NULL PRIMARY KEY,
City VARCHAR(20),
Status CHAR(1)
);
//2//
CREATE TABLE kr_salesperson (
Name VARCHAR(40) NOT NULL PRIMARY KEY,
Age INT,
Salary DECIMAL(8, 2)
);
//3//
CREATE TABLE kr_order (
Order_Number number(3) NOT NULL PRIMARY KEY,
Customer_Name VARCHAR(40),
Salesperson_Name VARCHAR(40),
Amount...
Please finish all 6 parts with indexing SQL. Don't need to do
the measure time things, but you can do it if you wanna do it.
Thanks!
Write the following SQL queries and measure their execution time both with and without using indexes 1. Count how many parts in NYC have more than 70 parts on hand 2. Count how many total parts on hand, in both NYC and SFO, are Red 3. List all the suppliers that have more...