ajax+php 无刷新数据调用经典实例
//s.php文件
$Db = new Db();
$type = ( $action=='esfPice')?1:2;
$sql = "Select * from cn_loupan_city_price where city_id ='$cid' and price_type='$type'";
$query = $Db->query( $sql );
$str ='';
if( $Db->rows( $query ) )
{
$result = $Db->fetch( $query ,0);
foreach( $result as $_v => $v )
{
$str .= "
".$v['city_price_show']."";
}
echo $str;
}
else
{
exit('可不选!');
}
//这里只讲ajax不讲数据库教程连接
www.111com.net原他