<?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