I have the following code:
public static function check($ip,$op,$page)
{
$con = new PDO(DBN,DB_USER,DB_PASS);
$sql = "SELECT COUNT(*) FROM ips WHERE ip=:ip";
$st = $con->prepare($sql);
$st->bindValue(":ip",$ip,PDO::PARAM_STR);
$st->execute();
$counter = $st->fetchColumn();
$con = null;
return $counter;
}
The $counter display the correct number of rows but if I add
$st->bindValue(":op",$op,PDO::PARAM_INT);
$st->bindValue(":page",$page,PDO::PARAM_INT);
$counter appear boolean false; I double checked my DB but every thing there is fine.I tried to add one of them and the other one but the problem persist;