Jump to content

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


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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.