Are you trying to scroll through the data? If you are trying to scroll through the data, inner joins are quite handy (if MySQL supports the construct). I use a really ugly looking inner join to accomplish the scrolling. This is formatted for MSSQL and Sybase, so adjust accordingly:
my($q) = "SELECT TOP $showcount * "; $q .= "FROM domains INNER JOIN "; $q .= " domains stuff ON stuff.domainname = domains.domainname "; $q .= " WHERE \(domains.domainname NOT IN "; $q .= " \(SELECT TOP $alpharow domains.domainname "; $q .= " FROM domains INNER JOIN "; $q .= " domains stuff ON stuff.domainname = domains.domainname "; if($filterstat eq "on") { $q .= "WHERE $filterset"; } $q .= " ORDER BY domains.domainname\)\) "; if($filterstat eq "on") { $q .= "AND $filterset "; } $q .= "ORDER BY domains.domainname"; Note that "stuff" is an alias for the innerjoin. I think the MySQL version of "TOP" is limit. I'm not as familiar with the MySQL as with this, so it may not support this type of query. But, I thought I'd offer it up for what's worth. $showcount is how many rows to return $alpharow is which row to start at based on the criteria and order provided. $filterstat and $filterset are used for introducing filter ("where") criteria in the query above when needed. There may be an easier way to write this, but this works and isn't too painful (as long as you don't look at it too long!). Regards, Karyn -----Original Message----- From: Scott R. Godin [mailto:[EMAIL PROTECTED] Sent: Sunday, March 30, 2003 10:55 PM To: [EMAIL PROTECTED] Subject: Re: MySQL Select question. Ron Stephan wrote: > The way I understand it, it will select all 100,000 and then try and > display them all. Between the server and the browser something is bound > to break or get stupefying slow. Am I wrong? Most of the time people > are going to have filter criteria in the display - maybe it doesn't > matter. But how do I mimic the "show all" logic but only actually show > the first 200 records (and at the end allow a browse to continue through > the next 200 records? > > > > Is this a stupid question? not at all try the LIMIT clause of MySQL :)