我想从 mysql 检索值到 php 这是代码 我想从 mysql 检索值到 php 这是代码
<?php
include 'config.php';
$query = "SELECT * FROM dealerpostproperty dp
LEFT JOIN property_type ON property_type.id = dp.property_Id LEFT JOIN registration ON registration.UserName = dp.UserName
WHERE dp.City = 'Navi Mumbai'
";
$result = mysql_query($query) or die ("Query failed");
//get the number of rows in our result so we can use it in a for loop
$numrows = (mysql_num_rows ($result));
// loop to create rows
if($numrows >= 1){
for ($r = 0; $r <= $numrows; $r++) {
// loop to create columns
while ($friendList = mysql_fetch_array($result))
{
$_SESSION['PropertyId'] = $friendList['property_Id'];
//Create table
echo " <tr> <td class='td2'>";
echo '<a href=# alt=Image Tooltip rel=tooltip content="<div class=td2><div id=imagcon><img src=img/1.jpg class=tooltip-image/></div><div id=con>'.$friendList['BedRooms'].' bhk </div><div id=con>'.$friendList['property_type'].'</div><div id=con>Area:'.$friendList['CoveredArea'].'</div><div id=con> '.$friendList['Type_cust'].' :'.$friendList['FirstName'].' '.$friendList['LastName'].' </div> <div id=con> <a href=# > View All Details </a> </div>
<br/>
<div id=con> <a href=# >';
echo " <img src='Dealer/images/email.png' style='width:15px;height:15px' />";
echo ' Contact Advertiser </a> </div> </div>
">'.$friendList['Name_of_ProjOrSociety'].'</a>'.'<br>';
echo "
</td>
<td ></td>
</tr>
<tr>
<td>".$friendList['City']."
</td>
<td>
</td>
</tr> ";
echo $friendList['dp.City'];
echo "fffff";
}}
}
?>
我想从中检索价值
<td>".$friendList['City']."
</td>
我试过这个但不工作怎么办??????我是php新手
???????????????????????????????????????
<td>".$friendList['dp.City']."
</td>