Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Filling field with date when using descriptors

Filling field with date when using descriptors

From: Frank Erdmann <Frank.Erdman_at_uni-muenster.de>
Date: Tue, 6 Nov 2001 18:15:16 +0100
Message-ID: <9s95qd$10hg$1@redenix.uni-muenster.de>


Hi!

In order to upload a BLOB into our DB I use descriptors. Unfortunately, I have to use the TO_DATE-function to insert a date but I don't know where to put the statement!
We are using ORACLE 8.1 and PHP.

This is what I tried:

$req = "INSERT INTO REPORT_SERVERFILE (FILE_ID, REALNAME, FILECOMMENT,
UPLOAD_DATE, MIME_TYPE, UPLOAD_FILE) VALUES (:file_id,:realname,:filecomment, TO_DATE(':upload_date', 'YYYY-MM-DD', 'NLS_DATE_LANGUAGE=American'),:mime_type, EMPTY_BLOB()) returning upload_file into :upload_file";

And then:
$stmt = OCIParse($conn, $req);

OCIBindByName($stmt, ":upload_date", $current_date, -1);

$current_date is a PHP-variable which represents a date in the format
YYYY-MM-DD. It doesn't work with the TO_DATE-function instead of $current_date, neither.

Is there any help out there?

Frank Received on Tue Nov 06 2001 - 11:15:16 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US