Re: Re: [PHP3] Multiple Recordsets
| From: | Manuel Lemos | Date: | Sun, 25 Jun 2000 04:45:02 +0000 |
| Subject: | Re: Re: [PHP3] Multiple Recordsets | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-2953@lists.php.net to get a copy of this message | ||
Precedence: bulk
Hello Rasmus,
On 23-Jun-00 06:39:05, you wrote:
>> The problem of PHP native database APIs is that they are modelled after
>> MySQL API. Since MySQL does not even support server side cursors it
>> doesn't need the ability to fecth multiple results from a query. I think
>> you should go to the bug report database page and post a report there to
>> warn the maintainer that multiple result queries are only returning a
>> result set.
>If this was true all the database interfaces would look the same. The
>database apis in PHP are modelled after the low-level apis provided by
>each database.
Ideally yes, but often PHP database APIs are modelled after MySQL because
initial maintainers are recommended take MySQL API as example to deploy
a API for new database to be supported. Although this may seem a good idea
for users that start with MySQL and migrate to other databases, trying to
support the same functions may not be such a good idea.
For instance, PHP Microsoft SQL server API has mssql_num_rows like there is
mysql_num_rows. The problem is that PHP MS SQL API always retrieve all
result rows after executing a query imposing a needless overhead since MS
SQL server may start returning result rows asynchronously, ie, before the
query search has ended at the server side. The way it is done in PHP there
is no way to take advantage of this, even if you never call mssql_num_rows.
Personally, I don't care much for Microsoft SQL server because I don't use
it, but this fact may well be a reason for complaint for slowliness of PHP
MS SQL API when compared with other Web scripting languages (ASP, Perl,
etc...).
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
--