Subject | Re: [firebird-php] Can you run an sql script from php? |
---|---|
Author | Lester Caine |
Post date | 2005-12-08T13:15:19Z |
willogibbo wrote:
need to be, Since there are many tools that will handle all sorts of
inputs which can then be run in ibase_execute. Nigels code is an
example. I use the datadict element of ADOdb to build and update
databases, that works quite nicely. I only have to 'shell out' to isql
to create a blank database if it does not exist.
So yes you can do anything you want in the SQL to manage your database
so you can sequence them from a php script. Another example of doing it
is in ibWebAdmin, which has a script window as one of it's functions.
--
Lester Caine
-----------------------------
L.S.Caine Electronic Services
Treasurer - Firebird Foundation Inc.
> Is it possible to run an sql script from php?There is no 'native' 'ibase_script', but to be honest there does not
>
> I know that queries and stored procedures can be (ibase_execute,
> ibase_query etc..), but I was wondering if there is any way to run an
> sql script e.g. a script that creates tables, procedure, triggers etc..
>
> I suspect the answer is no. I saw, on this forum, a post from Nigel
> Weeks, back in April 2005 that included a "script runner", namely a
> method of breaking a script up into its constituent queries and
> running those sql statements sequentially.
>
> If running scripts is not possible, can you put DDL script (say that
> creates a generator with its associated auto-increment trigger) into a
> form of sql that can be "run" from php?
need to be, Since there are many tools that will handle all sorts of
inputs which can then be run in ibase_execute. Nigels code is an
example. I use the datadict element of ADOdb to build and update
databases, that works quite nicely. I only have to 'shell out' to isql
to create a blank database if it does not exist.
So yes you can do anything you want in the SQL to manage your database
so you can sequence them from a php script. Another example of doing it
is in ibWebAdmin, which has a script window as one of it's functions.
--
Lester Caine
-----------------------------
L.S.Caine Electronic Services
Treasurer - Firebird Foundation Inc.