<?php
$A = array();
$result = $db->query("SELECT * FROM `destoon_company` WHERE `catid`='4' and `groupid`>'5' ORDER BY `userid` DESC LIMIT 0,4");
while($r = $db->fetch_array($result)) {
$A[] = $r;
}
foreach ($A as $key => $value) {
?>
<?php
$username=$value['username'];
$A = $db->get_one("SELECT `truename`,`mobile` FROM `destoon_member` WHERE `username`='$username'");
//print_r($A);
?>
<li class="wuliugongsi">
<div class="lepic"><img src="<?php echo $value['thumb']?>" width="120" height="90" alt="<?php echo $value['company']?>"></div>
<div class="cen">
<p><b><?php echo $value['company']?></b></p>
<p>联系人:<?php echo $A['truename']?> 座机:<?php echo $value['telephone']?> 手机:<?php echo $A['mobile']?></p>
<p>地址:<?php echo $value['address']?> 线路:<?php echo $value['zhuanxian14']?></p>
</div>
</li>
<?php
}
?>