脚本宝典收集整理的这篇文章主要介绍了php – mysqli_query,mysqli_fetch_array和while循环,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
我现在要做的是从数据库“portal”列出我的表“PRoPErty”的内容,并用结果填充表格.
我正在使用MysqLi_query,MysqLi_fetch_array和while循环.我收到以下错误:
session_start(); require_once "connect_to_MysqL.PHP"; // where i Store username and password to access my db. $sqlCommand = "SELECT * property From portal"; // dbname: portal - table: propery $query = MysqLi_query($myConnection,$sqlCommand); $Displayproperty = ''; while ($row = MysqLi_fetch_array($query)) $id = $row["pid"]; $tITle = $row["ptitle"]; $area = $row["parea"]; $city = $row["pcity"]; $Displayproperty .= '<table width="500" border="0" cellspacing="0" cellpadding="1"> <tr> <td>' . $id . '</td> <td>' . $title . '</td> <td>' . $area . '</td> <td>' . $city . '</td> <td><a href="forms.PHP?pid=' . $id . '">Upload images</a><br /></td> </tr> </table>';
以上是脚本宝典为你收集整理的php – mysqli_query,mysqli_fetch_array和while循环全部内容,希望文章能够帮你解决php – mysqli_query,mysqli_fetch_array和while循环所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。