Jump to content

how to Retrieves the number of rows from a result set in PHP MYSQL


Afser

Recommended Posts

Hello Friends,

 

 

I want a help from you people..

 

<?

include_once("include/conn.php");

include_once("include/functions.php");

 

 

if(isset($_POST['search']))

{

$search_query="";

 

$val = "0";

 

if($_POST['property_type']!='select')// && $_POST['country']!='select' && !empty($_POST['ind_type']))

{

 

if(!empty($search_query))

$search_query .= " AND property_type='$property_type'";

else

$search_query = " property_type='$property_type'";// AND country='$country' AND industry_type like '%$ind_type'";

}

 

if($_POST['region']!='select')

{

if(!empty($search_query))

$search_query .= " AND region='$region'";

else

$search_query = " region='$region'";

}

 

if($_POST['pax']!='select')

 

{

if(!empty($search_query))

$search_query .= " AND pax >='".$_POST['pax']."'";

 

else

$search_query = " pax >='".$_POST['pax']."'";

 

}

 

 

if($_POST['swimming_pool']!='select')

{

if(!empty($search_query))

$search_query .= " AND swimming_pool='$swimming_pool'";

else

$search_query = " swimming_pool='$swimming_pool'";

}

 

if($_POST['keyword']!='')

{

if(!empty($search_query))

$search_query .= " AND Beds='$keyword'";

else

$search_query = " Beds='$keyword'";

}

 

if($search_query!="")

$search_query = " Where ".$search_query;

 

 

}

 

echo $search_query;

  $search_result=getSearchList($search_query);

 

 

//  print_r($search_result[0]);

  foreach ($search_result as $sr)

  {

  ?>

 

i  am Getting Result out.. here i want to get the Number of Rows in Result set .. how to get it

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.