1

How to run oracle sql file from PHP using Adodb

1
  • 1
    Read file contents and run queries as usual? Commented Dec 16, 2010 at 13:20

1 Answer 1

1

If it's just a normal sql statement you could just read the file with file_get_contents and execute it.

$rs = $DB->Execute(file_get_contents('query.sql'));
Sign up to request clarification or add additional context in comments.

3 Comments

Is there any way to pass the filename to the Oracle client library? So that the library does the reading of it, instead of the caller doing it?
That wouldn't make sense, since the library needs to work everywhere, not only for your one script. :)
I don't think, you understood my question. What I'm looking for is some equivalent to $DB->ExecuteFile('query.sql')). Is there such a thing?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.