我看到一整行查询的回声:
echo "<ul>";
while($row = mysql_fetch_row($result))
{
echo "<li>{$row[0]}</li>";
}
echo "</ul>";
处理查询时,数据库中只显示一列 (client_id) 而不是整行。但是,当我使用
print_r(mysql_fetch_assoc($result));
就在while循环之前,我可以看到显示:
Array (
[client_id] => 1
[contact_first_name] => carla
[contact_last_name] => clausen
[business_name] => Banana Belt Liquors
[business_address] => 300 U.S. 24 Woodlan
[business_address2] =>
[business_city] => Woodland Park
[business_state] => Colorado
[business_zip] => 80863
[business_areaCode_phone] => 719
[business_phone] => 687
[business_phone2] => 9757
[business_url] => http://bananabeltliquors.com/
[business_email] => info@bananabeltliquors.com
)