What is wrong with this code ??

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
nirma78
Forum Commoner
Posts: 42
Joined: Wed Sep 17, 2003 2:02 pm

What is wrong with this code ??

Post 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
User avatar
devork
Forum Contributor
Posts: 213
Joined: Fri Aug 08, 2003 6:44 am
Location: p(h) developer's network

Post by devork »

can you post the complete error string....
nirma78
Forum Commoner
Posts: 42
Joined: Wed Sep 17, 2003 2:02 pm

Post by nirma78 »

The error says :

ORA-00972 Identifier too long

Thanks
Post Reply