Page 1 of 1

What is wrong with this code ??

Posted: Thu Oct 02, 2003 3:32 pm
by nirma78
Below is my script for inserting a uploaded file into a BLOB field.

I am using :
PHP Script
Oracle database

Code: Select all

<?php
<?php
include_once("header.inc.php");
include_once("config.php");
include_once("adodb/adodb.inc.php");

$file_name = $_FILES['userfile']['name'];

$uploaddir = "check/". $_FILES['userfile']['name'];

$up = move_uploaded_file($_FILES['userfile']['tmp_name'], $uploaddir);
chmod($uploaddir,0644);

$folder_name="check";

$doc_file=fread(fopen("$uploaddir","r"),filesize("$uploaddir"));

$app_id=63;

$app_mat_id=1;

$main_query = "INSERT INTO submitted_material_list
                       (Application_Material_ID,
                        Application_ID,
                        Physical_Copy
                        Rec_By,
                        Rec_Date)
                VALUES ($app_mat_id,
                        $app_id,
                        '$doc_file',
                        $app_id,
                        SYSDATE)";
 $result = $db->Execute($main_query) or die($db->ErrorMsg());
?>
?>
It gives me an error saying "Identifier too long"

Can anyone please help me on this PLEASE !!
Thanks in advance

Posted: Fri Oct 03, 2003 5:37 am
by devork
can you post the complete error string....

Posted: Fri Oct 03, 2003 9:02 am
by nirma78
The error says :

ORA-00972 Identifier too long

Thanks