$sql = “SELECT * FROM ORDERS”;
$result = $connection->query($sql);
if (!$result) {
die("Invalid query: " . $connection->error);
}
// read data of each row
while($row = $result->fetch_assoc()) {
echo "
<tr>
<td>$row[ORDER_ID]</td>
<td>$row[CUS_USERNAME]</td>
<td>$row[ORDER_DATE]</td>
</tr> ";
}
this is my code and is there anyway i can different attributes from different tables? (CUSTOMER, PRODUCT, ORDERS, PAYMENT, CUS_RETURN, DELIVERY)
I tried copying the entire code but with different table names but it showed below my the previous table (ORDERS)
New contributor
Jeska Ashley Chan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.