【发布时间】:2018-09-05 15:20:48
【问题描述】:
<?php
$con = mysqli_connect("localhost", "root", "", "zoo");
if (mysqli_connect_error()) {
echo "Failed to connect" . mysqli_connect_error();
}
$sel = "Select * from animal where quantity";
$result = mysqli_query($con, $sel);
while ($row = mysqli_fetch_array($result)) {
echo "<tr>";
echo"<td>" . $row['quantity'] . "</td>";
}
$qsel = "Select * from price where bill";
$result = mysqli_query($con, $qsel);
while ($row = mysqli_fetch_array($result)) {
echo "<tr>";
echo "<td>" . $row['bill'] . "</td>";
}
?>
如何将来自不同表但相同数据库 mysqli php 的 2 列相乘
【问题讨论】:
标签: php mysql multiplication