Re: GetRows equivalent?
| From: | Victor | Date: | Wed, 26 Jul 2000 17:00:33 +0000 |
| Subject: | Re: GetRows equivalent? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-8346@lists.php.net to get a copy of this message | ||
Did you ever hear of this wrapper: phpDB General module
I think it does what you want. I don't recall the specifics, but it
abstracts database-specific db calls but it returns results in a RecordSet
(much like java does). It's not an array, per se, but I am sure with a
little hacking, you can see how the RecordSet stores your Result Set and
have access to that (maybe add accessor methods for doing it too). They have
a pretty good manual, so you might want to check that first and see if this
will do anything for you.
http://phpdb.linuxave.net/
HTH,
Victor
On another note, I sure hope that perhaps one day PHP will have something
similar to JDBC where db calls are abstracted and writing to any db is the
same. This wrapper is a good fix for now: it works with mysql, mssql,
postgres, and others (but not oracle, I don't think).
Michael Kimsal wrote:
> Is there anything in PHP db drivers that could be considered
> the equivalent of GetRows from the ASP/ODBC world? In a nutshell,
> rather than looping thru a result set one row at a time, you
> can 'GetRows' and the entire result set will be returned as an
> array that you can loop thru locally, rather than continually
> pulling from the DB driver.
>
> The ODBC_RESULT_ALL function seems to be close, but it only
> prints out, and doesn't seem to let me put the results into an array.
>
> The PHP stuff is normally faster than standard VBScript/ASP,
> but having this concept could, I think, speed things up even further
> on the PHP side of things.
>
> Is this a function we'd have to write ourselves for each db driver?