![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB Connectivity » View Thread |
Messages 1 to 5 of 5 total |
![]() |
Thu, May 27 2010 8:26 AM | Permanent Link |
Laszlo Szabo | Hi!
I want to ask two things, because I don't saw any example about it: a.) How to call a stored procedure from php that valid in EDB? for example: testproc(in a integer; out b clob); I want to call it. b.) How to get the last inserted row ID? odbc_exec('insert into test (name) values('x')'); How to get the FIeld ID value. THanks for your help, or some links the light my mind... dd |
Thu, May 27 2010 5:46 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Laszlo,
<< I want to ask two things, because I don't saw any example about it: a.) How to call a stored procedure from php that valid in EDB? >> The syntax is: CALL testproc(testproc(?,?,...) where ? are the parameters that must be bound. I'll have to double-check to see if PHP supports executing the CALL statement with ODBC. << b.) How to get the last inserted row ID? >> You have to bind an input/output or output parameter for the INSERT statement, and then you can retrieve the IDENTITY value by looking at the parameter value after the INSERT execution. INSERT INTO MyTable (MyIdentityColumn, MyOtherColumn) VALUES (?, 'Test Value') Again, I'll have to test this with PHP and their ODBC support. Some front-ends don't support input/output or output parameters with ODBC drivers. -- Tim Young Elevate Software www.elevatesoft.com |
Fri, May 28 2010 9:16 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Laszlo,
<< I want to ask two things, because I don't saw any example about it: >> I looked into this with PHP 5 and their ODBC support, and the quick answers are: a) No b) No There seems to be some issues with parameters in general, and you definitely cannot use INOUT or OUT parameters with PHP and their ODBC support. The only solution is to wait until we can produce a native PHP extension for ElevateDB. -- Tim Young Elevate Software www.elevatesoft.com |
Mon, May 31 2010 3:30 AM | Permanent Link |
durumdara | "Tim Young [Elevate Software]" wrote:
<< I want to ask two things, because I don't saw any example about it: I looked into this with PHP 5 and their ODBC support, and the quick answers are: a) No b) No There seems to be some issues with parameters in general, and you definitely cannot use INOUT or OUT parameters with PHP and their ODBC support. The only solution is to wait until we can produce a native PHP extension for ElevateDB.>> Or if we make a callable DLL that got the pure string SQL (PChar buffer) with insert statement, and returns the output identifier's value. Same with procedure... Or a callable exe, what get an input file with SQL, and make an output file with the result. I did something (name bridge) between mod_python and DBISAM, because pyodbc everytime crashed under Apache... Hmmmm... Thanks for your information! |
Tue, Jun 1 2010 3:03 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | << Or if we make a callable DLL that got the pure string SQL (PChar buffer) with insert statement, and returns the output identifier's value. Same with procedure... >> Yes, if you can load and call a DLL with PHP, then you could create your own data access DLL. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Wednesday, August 14, 2024 at 03:12 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |