Re: M. Lemos's form class questions
| From: | Manuel Lemos | Date: | Sat, 28 Oct 2000 16:40:14 +0000 |
| Subject: | Re: M. Lemos's form class questions | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-22458@lists.php.net to get a copy of this message | ||
Hello Jouni,
On 17-Oct-00 07:22:33, you wrote:
>> > BTW, PHP Interbase API developer (jah) mentioned that for the time being
>> > he does not have the time to fix the problem with direct queries being
>> > implemented with prepared queries. Since that prevents us from creating
>> > Interbase databases using SQL statements, I wonder if you have the time
>> > to have a look and write a patch to have it done right.
>>
>> Well, it should take me alot more time to do this (I'll have to learn the
>> Interbase API), so I can't promise anything :-(
>I've been already at least thinking about the problem. To be able to
>determine the type of an SQL query issued with isc_dsql_sql_info(), it
>*must* be prepared first. So that's why they are prepared.
>Another thing is that, according to the InterBase API documentation, even
>those functions meant for immeadiate execution of SQL statements *do*
>prepare the statement, with the exception being a case when both database
>and transaction handle are NULLs and the statement is 'CREATE DATABASE'.
It is easy to figure if a query is CREATE DATABASE or DROP DATABASE and so
not prepare it.
>For the needs of MetaBase, I think the easiest solution will be to create
>functions ibase_create_database(), ibase_drop_database and maybe
>ibase_do() that calls isc_dsql_execute_immediate() (if there appears to
>be more SQL statements that have problems with the way the module
>currently works. You know any?).
>Would this be a sufficient solution? At least it would be the easiest one.
CREATE DATABASE requires any type of connection to the server but DROP
DATABASE requires you to connect the actual DATABASE you will be dropping.
If you can make it work that simple with a couple of functions, it's fine for
me.
I am just not sure about the right sequence of statements that will be used
from PHP code because if those functions establish the connection to the
server they need to get also a bunch of connection parameters. If they
take a connection handle parameter instead that handle has to be set to
connect to the database to be dropped.
Regards,
Manuel Lemos
Web Programming Components using PHP Classes.
Look at: http://phpclasses.UpperDesign.com/?user=mlemos@acm.org
--
E-mail: mlemos@acm.org
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--