How can I get first 100 values from database and next 100 and so on?

I have a simple database to store some emails, Is there any way to get the emails from the database in groups of a 100 emails ???

Here is the database structure

Table structure for table `emails`
--

CREATE TABLE IF NOT EXISTS `emails` (
  `email` varchar(100) NOT NULL,
  `ip` varchar(15) NOT NULL,
  `timestamp` datetime NOT NULL,
  PRIMARY KEY  (`email`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

The ideal outcome would be to get the first 100 emails, do something and later get the next 100 and do something else.

Thanks and sorry for my english

Answers


LIMIT 100

http://dev.mysql.com/doc/refman/5.1/en/select.html#id827984

Then for the next one, LIMIT 100, 100, and then LIMIT 200, 100, and so on.

The first number (when there are two) is the offset.


Need Your Help

handle OS specific .classpath file in a hg repo

eclipse osx version-control mercurial

I have a Java project in Eclipse and version-control is a mercurial repo.

C - Undefined symbols for architecture x86_64 when compiling on Mac OSX Lion

c osx osx-lion x86-64

I'm getting some problems on compiling a very very simple name.c file on Mac OSX Lion.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.