View Single Post
  #1 (permalink)  
Old 03-21-2008, 03:31 PM
iroy2000 iroy2000 is offline
Junior Member
 
Join Date: Mar 2008
Posts: 15
Default php count() or sql count(*) is faster??

I'm building a pagination, but I have a question in my mind

php count() and count(*) in mysql would be better if the data size is getting bigger?

Or do you have other efficient way to get the "number of elements" in a collection and the data all together??

Because if I use sql way, I need to send 2 queries to database....

Last edited by iroy2000 : 03-21-2008 at 03:38 PM.
Reply With Quote