我得到的警告是:
警告:mysqli_result::fetch_array() 期望参数 1 很长,对象在...第 103 行给出。
我在第 103 行旁边发表了评论while ($row = $result->fetch_array($result)) {
问题 2:我可以将其中的任何内容存储在包含文件中还是应该存储?
问题 3:$query
我可以将这些买方、卖方等中的任何一个存储在某个数组中吗?如何?
/* FETCH CONTACT INFORMATION */
$query = ("SELECT * FROM contacts WHERE contacttype IN ('Buyer','Seller','Buyer / Seller','Investor') AND leadstatus = 'New' ORDER BY date DESC");
$ID = $row ['ID'];
$firstname = $row ['firstname'];
$lastname = $row['lastname'];
$ID = $row['ID'];
$partner = $row['spousefirst'];
$phonecell = $row['phonecell'];
$email = $row['email'];
$date = $row['date'];
$contacttype = $row['contacttype'];
$agentassigned = $row['agentassigned'];
$leadstatus = $row['leadstatus'];
$result = $mysqli->query($query) or die ("Error: ".mysqli_error($mysqli));
echo'
<table class="results" id="results">
<thead>
<tr>
<th width="10"><input type="checkbox" name="checkAll" id="checkAll" class="checkall" value="check all"></th>
<th>NAME</td>
<th>PARTNER</td>
<th>PHONE</td>
<th>EMAIL</td>
<th>DATE</td>
<th>TYPE</td>
<th>AGENT</td>
<th>STATUS</td>
<th>NOTES</td>
<th>TASKS</td>
<th> </td>
</tr>
</thead>';
while ($row = $result->fetch_array($result)) { // THIS IS LINE 103
echo'
<tbody>
<tr>
<td width="10"><input type="checkbox" name="" id="" value="'.$ID.'"></td>
<td><a href="/backend/leads/view/?ID='.$ID.'"><strong>'.$firstname.' '.$lastname.'</strong></a></td>
<td><a href="/backend/leads/view/?ID='. $ID.'">'.$partner.'</a></td>
<td>'.$phonecell.'</td>
<td><a href="mailto:'. $email.'">'.$email.'</a></td>
<td>'.date("M jS, g:i A", strtotime($date)).'</td>
<td>'.$contacttype.'</td>
<td>'.$agentassigned.'</td>
<td>'.$leadstatus.'</td>
<td><a href="/backend/contacts/notes.php?ID='.$ID.'">View</a> +</td>
<td><a href="/backend/contacts/todo.php?ID='.$ID.'">View</a> +</td>
<td><a href="/backend/contacts/deletesuccess.php?ID='.$ID.'">D</a></td>
</tr>
</tbody>
</table>';
}
?>