You are here: Re: So, SELECT count(*)... or mysql_num_rows(...) « PHP Programming Language « IT news, forums, messages
Re: So, SELECT count(*)... or mysql_num_rows(...)

Posted by Captain Paralytic on 07/27/07 13:48

On 27 Jul, 14:24, Webrickco <webric...@gmail.com> wrote:
> On Jul 26, 3:03 pm, Captain Paralytic <paul_laut...@yahoo.com> wrote:
>
>
>
>
>
> > On 26 Jul, 14:20, Rik <luiheidsgoe...@hotmail.com> wrote:
> > | mysql_num_rows(), underneath the surface it is essentially the same
> > as
> > | FOUND_ROWS(), with the added bonus of getting an integer straight
> > back.
>
> > I don't think so Rik!
>
> > mysql_num_rows() will tell you how many rows have been returned in
> > this particular request.
>
> > FOUND_ROWS() will tell you how many rows would have been returned if
> > you did not have a LIMIT clause on the previous query and it also
> > requires the previous query to have had SQL_CALC_FOUND_ROWS in it.
>
> > SELECT FOUND_ROWS() AS num FROM TABLE
>
> > will return you the value of 0 for as many rows as there are in the
> > table.
>
| For compatibility purposes use something standard like select count.

What has this got to do with my post?

 

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

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