title: Image uploading with php with oracle database backend using ADOdb library
body: <p>The lines of code that reads the images are</p>
  
  <pre><code>$regular = fread(fopen('tmp/tmp3.jpg', "r"), filesize('tmp/tmp3.jpg'));
  $thumb= fread(fopen('tmp/tmp2.jpg', "r"), filesize('tmp/tmp2.jpg'));
  $pure = fread(fopen('tmp/tmp.jpg', "r"), filesize('tmp/tmp.jpg'));
  </code></pre>
  
  <p>This is the code I have that should insert an image into the database.</p>
  
  <pre><code>$q = "INSERT INTO pacs_images VALUES (:record_id, :image_id, :thumb, :regular, :pure)";//debug
  $statement = $conn -&gt; Prepare($q);
  $rs = $conn -&gt; Execute($statement, array('record_id' =&gt; $fileNumber, 'image_id' =&gt; $imageNumber,
                      'thumb' =&gt; $thumb, 'regular' =&gt; $regular, 'pure' =&gt; $pure));
  </code></pre>
  
  <p>The error message I get from oracle is</p>
  
  <pre><code>ORA-01461: can bind a LONG value only for insert into a LONG column
  </code></pre>
  
  <p>I know for the fact that the table schema is</p>
  
  <pre><code> Name                      Null?    Type
   ----------------------------------------- -------- ----------------------------
   RECORD_ID                 NOT NULL NUMBER(38)
   IMAGE_ID                  NOT NULL NUMBER(38)
   THUMBNAIL                      BLOB
   REGULAR_SIZE                       BLOB
   FULL_SIZE                      BLOB
  </code></pre>
  
  <p>I don't know what is wrong here, I'm pretty sure the database schema is set up properly and $fileNumber and $imageNumber are integers, and I have echoed them and made sure they are printing the right numbers, in this case, 1001. I'm also using the oci8 driver to connect to oracle. Can anyone see what's wrong with this code?</p>