Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> PHP -> ODBC -> ORACLE help needed!
Hi, I'm trying to get the next id to insert using
a select statement. I'm not using sequences since
the goal is to make the application working on
many databases.
When I use SQL*Plus it works...
SELECT MAX(id)+1 FROM entitites;
Altough when I use the same call using PHP through ODBC it doesn't work.
PHP returns an access violation. It looks like the handle that ODBC returns is not null but not valid. Here's the error:
PHP has encountered an Access Violation at 04C2EA86
And it generates an HTTP 500 - Internal Error.
Any ideas?
When I remove the MAX(id) and just select the id instead it works... Is there any know issues regarding MAX() function when using ODBC?
Please I don't want to use MS SQL Server!
Configuration:
Oracle 8i Release 2 with its ODBC drivers and
PHP 4.0 RC1 and IIS 4.0.
Entities table looks like this:
ID number(5,0) NAME varchar2(40) TAG char(6)
-------------- ------------------ ----------- 0 EntityName ENT001
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Apr 07 2000 - 12:44:32 CDT
![]() |
![]() |