title: Postgresql insert in PDO
body: <p>All my scripts are written in pdo-mysql . Now i am migrating to posgresql. I have been stuck in an insert query.</p>
  
  <pre><code>CREATE TABLE bus_spot
  (
      bus_id integer NOT NULL,
      spot_loc_id integer NOT NULL,
      bus_dir_id integer NOT NULL
  )
  </code></pre>
  
  <p>php query used</p>
  
  <pre><code>$Bus_Id = 579;
  $Bus_Dir_Id = 3;
  $User_Loc_Id = 465;
  
  $ISp_Res = $pdo-&gt;prepare("INSERT INTO bus_spot(bus_id, bus_dir_id, spot_loc_id) VALUES(?, ?, ?)");
  $ISp_Res-&gt;execute(array($Bus_Id, $Bus_Dir_Id, $User_Loc_Id));
  </code></pre>
  
  <p>I am getting the following error when trying to insert this row</p>
  
  <blockquote>
    <p>SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: \"\""}</p>
  </blockquote>