# database driver: no more rows

- Thread: https://externals.io/message/4914
- Original archive: https://news-web.php.net/php.internals/4914
- Started by Ilia Alshanetsky on 2003-10-22T17:18:26+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #4915 — Lukas Smith — 2003-10-22T17:18:00+00:00

URL: https://externals.io/message/4914#4915 · In reply to: #4914

> From: Ilia Alshanetsky [mailto:ilia@prohost.org]
> Sent: Wednesday, October 22, 2003 7:18 PM
> To: Lukas Smith; 'PHP Development'
> Subject: Re: [PHP-DEV] database driver: no more rows
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I wouldn't mind such a change myself, however what about all the
> installations
> where people do while (*fetch_row() !== false) ?

Yeah ... php5 would be a good time to make this change.
I don't assume that a lot of people will actually do !== since in those
methods you either get an array or false ..

Regards,
Lukas

---

## #4914 — Ilia Alshanetsky — 2003-10-22T17:18:26+00:00

URL: https://externals.io/message/4914#4914

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I wouldn't mind such a change myself, however what about all the installations 
where people do while (*fetch_row() !== false) ?

Ilia
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE/lrviLKekh381/CERAigRAJ0fRN4pB7YotuUscTQPZIHalgJcaACfel/2
12EFNHs3rQT+/C7w02mDxGs=
=RvvP
-----END PGP SIGNATURE

---

## #4916 — Ard Biesheuvel — 2003-10-22T17:55:52+00:00

URL: https://externals.io/message/4914#4916 · In reply to: #4915

> > […]

Wouldn't it be a lot easier to do it the other way around ?
I mean, the semantics of returning false when a fetch cannot be executed
because aren't any rows left is perfectly clear, and returning `NULL` when 
the result cannot be determined (because of an error) is also better 
than returning any other value (like 'false').

This would also be easier to carry out while maintaining BC.

-- 
Ard
