sandro27
04-27-2005, 04:06 PM
Hi,
I would like to know how can make the script to seach the database and if "0" are found it just give no results found.
script bellow
<?
include "intro.php";
$area=$_POST['area'];
if($area==''){
$area=$_GET['area'];}
$category=$_POST['acc_category'];
if($category==''){
$category=$_GET['acc_category_id'];
}
$sql="select * from accommodation,area,acc_category where
area.area_id=accommodation.area and accommodation.category_id=acc_category.acc_category_id
and area='$area'
and acc_category_id='$category'
order by acc_name limit $from,$max_results";
$search=mysql_query($sql,$search) or die(mysql_error());
$list=mysql_fetch_array($search);
?>
Thanks for any help
:o
I would like to know how can make the script to seach the database and if "0" are found it just give no results found.
script bellow
<?
include "intro.php";
$area=$_POST['area'];
if($area==''){
$area=$_GET['area'];}
$category=$_POST['acc_category'];
if($category==''){
$category=$_GET['acc_category_id'];
}
$sql="select * from accommodation,area,acc_category where
area.area_id=accommodation.area and accommodation.category_id=acc_category.acc_category_id
and area='$area'
and acc_category_id='$category'
order by acc_name limit $from,$max_results";
$search=mysql_query($sql,$search) or die(mysql_error());
$list=mysql_fetch_array($search);
?>
Thanks for any help
:o