title: What's wrong within SQL query?
body: <p>I'm using this query to get range of rows for example 0-5 , But I get an error message.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>if(isset($_GET['page']) &amp;&amp; isset($_GET['per'])){        
      $per = $_GET['per'];
      $pageNumber = $_GET['page'];
      $from = ($pageNumber * $per) - $per;
      $results = $pdo-&gt;prepare('SELECT * FROM users LIMIT :sfrom , :sto');
      $results-&gt;execute(array('sfrom' =&gt; $from , 'sto' =&gt; $per));
  }
  </code></pre>
  
  <p>I get the following error :</p>
  
  <p>Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''5' , '5'' </p>
  
  <p>I think that's because the <code>$from</code> and <code>$per</code> are inserted as strings or something I tried to convert them to int using <code>(int)$from</code> , <code>(int)$per</code>
  But still having the same error</p>