Dear Friends,
Help me to fix this..
Error Message : mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in
Code is,
<?php
$database=$diocese;
$table=$category;
//capture search term and remove spaces at its both ends if the is any
$searchTerm = trim($_GET['query']);
//check whether the name parsed is empty
if($searchTerm == "")
{
echo "Enter name you are searching for.";
exit();
}
//database connection info
$host = "localhost"; //server
$db = $_GET['db']; //database name
$user = "root"; //dabases user name
$pwd = ""; //password
$table = $_GET['fundcat'];
//connecting to server and creating link to database
$link = mysqli_connect($host, $user, $pwd, $db);
//MYSQL search statement
$query = "SELECT * FROM '%$table%' WHERE Fund Name LIKE '%$searchTerm%'";
$results = mysqli_query($link, $query);
/* check whethere there were matching records in the table
by counting the number of results returned */
if(mysqli_num_rows($results) >= 1)
{
$output = "";
while($row = mysqli_fetch_array($results))
{
echo '<table>';