|
Posted by Rik Wasmus on 11/21/07 10:18
On Wed, 21 Nov 2007 06:28:04 +0100, Jesse Burns aka jburns131 =
<jburns131@gmail.com> wrote:
> I've got a coding problem here that I could use some help with.
> $row =3D mysql_fetch_array($this -> mySQLresult, $type) or =
> die(mysql_error());
Don't use 'or die()' here. If there are no further results (rows are =
finished), mysql_fetch_array() will return false, the die() will be =
executed, with nothing to display as there is no mysql_error(), it's jus=
t =
worked correctly.
And don't die() in production. Log the error, and degrade as gracefull a=
s =
you can.
-- =
Rik Wasmus
Navigation:
[Reply to this message]
|