tags:

views:

79

answers:

2

I want to retrieve all rows of a particular user with limit 0,x..

So i just want to ask is there any way to retrieve all rows in mysql without calling a method which returns count(id) of x& without making an overload of existing function which does not have limit at all in query & withour string.Relace() functionality.

As internally mysql is might using this when we check show all check Box then all rows of taht table are displayed

+3  A: 

If you want to retrieve all rows, you just don't use the LIMIT clause..

Bozho
he said: "I want to retrieve all rows of a particular user with limit 0,x.."
Sarfraz
where x = max, I assumed.
Bozho
deepesh khatri
@deepesh khatri - then I don't get why you want to use `LIMIT`, if you don't want to `LIMIT` anything
Bozho
deepesh khatri
not one bit....
Bozho
You mean you want to break all of the user's rows into multiple pages, so first visit they only see the first 100 rows, then they can click to page 2 and get rows 101 through 200, etc...?That's exactly what LIMIT is designed for. Retrieving all the relevant rows in the database and then filtering in the program is a waste of bandwidth/cpu cycles.
Marc B
@Bozho: i got the solution see it.
deepesh khatri
A: 

Simple solution is sending int's max range to method i.e 2147483647 as it is same in both mysql & c# (4 bytes) can use int.MaxValue . see references http://dev.mysql.com/doc/refman/4.1/en/numeric-types.html,http://msdn.microsoft.com/en-us/library/5kzh1b5w%28VS.80%29.aspx .

deepesh khatri