|
Posted by ATK on 05/22/05 06:23
Hi,
I'm trying to upload a image file to a oracle DB and i need to only use
ODBC functions.
In db i have a LONG RAW column (if this is not correct, please tell me).
I'm getting the error from oracle: [Oracle][ODBC][Ora]ORA-00972:
identifier is too long...
here is my php code:
if (isset($_FILES['foto']['name']) & !empty($_FILES['foto']['name'])) {
$foto = $_FILES['foto']['tmp_name'];
$date = addslashes(fread(fopen($foto, "r"), filesize($foto)));
$id = $_SESSION['id'];
$foto_type = $_FILES['foto']['type'];
$sql = "INSERT INTO fotos (id_foto, id_cat, id_m, fotos, avg,
total, foto_type) VALUES (fotografias_id.nextval, 1, $id, '$date', '0',
'0', '$foto_type')";
....
then i execute the sql, etc...
------------------
Any ideas how should i accomplish this upload task?
thanks in advance for your time,
ATK
Navigation:
[Reply to this message]
|