Reply to Re: So, SELECT count(*)... or mysql_num_rows(...)

Your name:

Reply:


Posted by Captain Paralytic on 07/26/07 14:03

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.

[Back to original 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

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