You are here: Re: How do I handle mysql not found conditions? « PHP Programming Language « IT news, forums, messages
Re: How do I handle mysql not found conditions?

Posted by Big Moxy on 11/09/07 18:57

On Nov 9, 10:11 am, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> Big Moxy wrote:
> > On Nov 9, 9:38 am, "Rik Wasmus" <luiheidsgoe...@hotmail.com> wrote:
> >> On Fri, 09 Nov 2007 18:25:36 +0100, Big Moxy <bigm...@gmail.com> wrote:
> >>> $rows = mysql_num_rows($result) or die(mysql_error());
> >> How do you think this well act if the result of mysql_num_rows() is 0?
> >> --
> >> Rik Wasmus
>
> > I want mysql_num_rows() = 0 to be treated as a not found condition.
> > Isn't that already handled?
>
> > Tim
>
> Rik is correct.
>
> Figure out what this statement does:
>
> $rows = mysql_num_rows($result) or die(mysql_error());
>
> Then figure out why it isn't good to use die() *anywhere* in production
> code.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================

How do I differtiate 0 from some other error? I want true errors to be
handled differently than the basic not found condition.

Tim

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация