<?php
$connection = mysql_connect('###', '###', '###');
mysql_select_db('msg360db1');
$sql = "SELECT * FROM call_log where Pod = 'KNF'";
$result = mysql_query($sql);
echo
"<table cellspacing='0' cellpadding='0'>
";
while($row = mysql_fetch_array($result))
{
echo "
<tr>
<td style='margin-right:10px;'>" . $row['Rep'] . "</td>
<td style='margin-right:10px;'>" . $row['EWD'] . "</td>
<td style='margin-right:10px;'>" . $row['CalltimeThisWeek'] . "</td>
<td style='margin-right:10px;'></td>
<td style='margin-right:10px;'>" . $row['CallsThisWeek'] . "</td>
<td style='margin-right:10px;'></td>
<td style='margin-right:10px;'>" . $row['CalltimeToday'] . "</td>
<td style='margin-right:10px;'>" . $row['CallsToday'] . "</td>
</tr>
";
}
echo "
</table>";
mysql_close();
?>
<?php
$row['CalltimeThisWeek'];
$row['EWD'];
$number = ($row['EWD']/$row['CalltimeThisWeek']);
echo 'Result: '.$number;
?>
我已經連接到我的數據庫,併成功創建了一個表,其中的信息,但是,我想通過EWD這是這一週來劃分通話時間值在1到7之間,這些值存儲在我的數據庫中。企圖分裂數據庫條目,但不斷收到錯誤
你會得到什麼錯誤? –
我得到這個, 警告:司在d爲零:\虛擬主機\ msg360.co.uk \的httpdocs \ emailtesting \ fuel_target \ example_divide.php線路33 結果: – user3257454
線33這一行,如果有幫助 $ number =($ row ['EWD']/$ row ['CalltimeThisWeek']); – user3257454