我的pdo阅读声明它无法正常工作

Im trying to devellop a pagination system and Im having an strange issue. I have this code below and the code is always entering in my if condition saying there are 0 results. But I have the sql statment correct when I do a print_r. Can you see if theres something wrong that I´m not seeing?

 $pag = (empty($_GET['pag']) ? '1' : $_GET['pag']);
            $max = 3;
            $begin = ($pag * $max) - $max;
            $readPages = $pdo->prepare("SELECT * FROM pages where id_numb IS null LIMIT :beg,:ma");  
            $readPages->bindValue(":beg", $begin);
            $readPages->bindValue(":ma", $max);    
            $readPages->execute();
            $num_rows = $readPages->rowCount();

            if(!$num_rows >= 1)
            {
                echo '0 results';
            }
        $num_rows = readPages->rowCount();
                    ^---missing $. A constant object? no way...
        print_r($lerCat);
                 ^^^^^^--- undefined variable
  1. always enable exception mode for PDO to be notified of SQL errors
  2. for the LIMIT clause you have to set PDO::PARAM_INT explicitly