Jump to content

Hello everybody!

 

So I'm having a very specific problem:

For a web app I'm currently building, I have to have a PHP script, which interacts with my database. There's a (LUA) script on said database, that handles a few SQL statements and returns the result in the form of a table (the picture below shows the output of the script):

image.png.7141829d70df90f6677f9df0c0ba7079.png

 

I can't however seem to php to fetch the result of the script execution. Any ideas?

75% of what I say is sarcastic

 

So is the rest probably

Link to comment
https://linustechtips.com/topic/1063535-php-wait-for-response-of-db-script/
Share on other sites

Link to post
Share on other sites

I would suggest not mixing Lua into the database, until completely necessary. Maybe you should consult the Database Engine SQL's specification. Maybe it's possible to return something from within EXECUTE statement, but I have no idea of knowing unless I know what is the specific SQL engine.

Link to post
Share on other sites

On 5/13/2019 at 7:24 PM, PeterBocan said:

I would suggest not mixing Lua into the database, until completely necessary. Maybe you should consult the Database Engine SQL's specification. Maybe it's possible to return something from within EXECUTE statement, but I have no idea of knowing unless I know what is the specific SQL engine.

Sorry for getting back at you this late.

 

The SQL engine is ExaSol, which is not a very widespread engine afaik. And LUA is a standard part of said engine, all UDSs are in LUA

75% of what I say is sarcastic

 

So is the rest probably

Link to post
Share on other sites

You'd have to use ODBC to connect to the database and execute the script, since it seems like the script itself resides in the database. In fact, even if you wanted to run SQL in general with that database, since there's not a PHP driver for it as far as I can see, you'd still have to use ODBC.

 

https://www.php.net/manual/en/book.uodbc.php

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×