Re: ibase_query
| From: | Jouni Ahto | Date: | Mon, 28 Feb 2000 00:41:47 +0000 |
| Subject: | Re: ibase_query | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-16083@lists.php.net to get a copy of this message | ||
On Sun, 27 Feb 2000, Sterling Hughes wrote:
> Hi,
> I'm currently working on getting the docs for Interbase into shape and I
Thanks, that's something thats been on my todo-list something like a
year...
> came across an oddity. With most functions, such as the mysql functions, the
> syntax for a query is the optional link_identifier second and the query first,
> however, with ibase_query it is the other way around:
>
> int ibase_query([int link_identifier], string query)
in fact it is
int ibase_query([int link_identifier,] string query [, int bind_args])
> This is a kind of backwords logic to have the optional parameter first. I think
> it should be changed, however, it is not really my place to change it (all that
> is required is a one line change), not only that but there would be an effect
> for people currently using the ibase functions.
I don't remember if it was me or Andrew Avdeev who made it work this way,
but I do agree on that it is backwards compared to anything else in
PHP3/4. ... (Went back to look at the code, I think it was Andrew.)
> I know this is not an important, or big change, but perhaps it should be a
> change that is considered just so that we keep all of the different functions
> more closely related (it will also make more sense to have the optional argument
> last. Let me know what you think.
I have finally started to port the latest Interbase module from PHP3 to
PHP4 (committing within a week (hope so...)), and I think I'll change the
order of arguments to ibase_query. Just one mone incompatibility... Please
let PHP3 stay as it is, I don't think that changing the order of arguments
to a function within a major release is acceptable. Between major
releases, it's always possible to refer to words like 'concistency'
etc. :)
-- Jouni Ahto