-2

I have a code it's working with MysQl but does not work in MySQLi:

function CheckBlocked($table, $thisip, $service) {
    $sql="SELECT * FROM $table WHERE code = '$service' AND b_contents LIKE '%.$thisip.%'";
    $query=mysqli_query($dbconnect,$sql);
    $num=mysqli_num_rows($query);
    if ($num > 0) {
        return true;
    } else {
        return false;
    }
}

How to used in MySQLi ?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62

1 Answers1

-2

try this code :

 $sql="SELECT * FROM $table WHERE code = '$service' AND b_contents LIKE '%".$thisip."%' ";
Ajay Krishna Dutta
  • 722
  • 2
  • 7
  • 21