Re: How extract pure sequences from an Oracle DB?

From: Date: Mon, 18 Sep 2000 23:23:46 +0000
Subject: Re: How extract pure sequences from an Oracle DB?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-2956@lists.php.net to get a copy of this message
On Mon, 18 Sep 2000, Roberto Sartor wrote: > <?php > .... > $sel_seq_sql="SELECT EDIPRO_SEQ.NEXTVAL ID_EDIPRO FROM DUAL"; > $cur_seq= OCIParse ($conn, $sel_seq); > OCIDefineByName ($cur_seq, "ID_EDIPRO", &$id_edipro,-1); > .... > OCIExecute ($cur_seq,OCI_DEFAULT); // this is line 56 > OCIFetch ($cur_seq); // this is line 57 > .... > ?> > > connections is an OCILogon and Oracle server is up. > All goes on with normal queries, but I receive following errors select from > sequences: > Running this piece of PHP, I receive following error: > /home/httpd/html/privati//bianco_xxx.php on line 56 > Warning: OCIFetch: OCI_INVALID_HANDLE in > /home/httpd/html/privati//bianco_xxx.php on line 57 > Warning: OCIStmtExecute: ORA-24337: statement handle not prepared in > /home/httpd/html/privati//bianco_xxx.php on line 56 > Warning: OCIFetch: OCI_INVALID_HANDLE in > /home/httpd/html/privati//bianco_xxx.php on line 57 > Warning: OCIStmtExecute: ORA-00001: unique constraint I think you have a problem with your query. You should use the AS keyword. Try: $sel_seq_sql="SELECT EDIPRO_SEQ.NEXTVAL AS ID_EDIPRO FROM DUAL"; -- Meir Kriheli MKsoft computer systems "There's someone in my head but it's not me" - Pink Floyd

« previous php.db (#2956) next »