title: I have a syntax error and it doesnt make sense
body: <p>I don't know why but i have a syntax error, my code looks completely fine to me, </p>
  
  <pre><code>$page = $_POST['page'];
  $amount = $_POST['amount'];
  
  
  
  $Realpage = intval($page);
  $Realamount = intval($amount);
  $query = $con-&gt;prepare(
     "SELECT 
        * 
      FROM 
        store 
      AS 
        s
      INNER JOIN 
        product_pictures AS pp 
      ON 
        s.product_id = pp.id 
      INNER JOIN 
        product_name AS pn 
      ON 
        s.product_id = pn.id 
      WHERE 
        (s.product_price BETWEEN :firstPrice AND :secondPrice) AND 
        product_name LIKE :input LIMIT :page , :amount ");
  
  $query-&gt;execute(array(':input' =&gt; "%" . $input . "%" , ":firstPrice" =&gt; intval($firstPrice), ":secondPrice" =&gt; intval($secondPrice) , ':page' =&gt; $Realpage * $Realamount, ':amount' =&gt; $Realamount));
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p><b>Fatal error</b>:  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 MySQL server version for the right syntax to use near ''0' , '20'' at line 1'</p>
  </blockquote>