[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] MySQL begrænset SELECT



Peter Maersk-Moller wrote:

Antag, at jeg har en db-table med 100, 1000 eller 1000000 rækker.
Når jeg nu søger, ønsker jeg f.eks. kun at få vist N rækker af
gangen, da jeg alligevel ikke praktisk kan vise en million
linjer på en webside.

kan man gøre noget i stil med

SELECT * FROM db-table START=50 END=99;

som så skulle returnere række 50 til række 99 ?

Hvis vil have 50 til 99, så hedder den: SELECT * FROM db-table LIMIT 50, 49;

Se http://dev.mysql.com/doc/mysql/en/SELECT.html (søg efter den bullet, der handler om LIMIT)

(( Flemming ))

--
Flemming Mahler Larsen, http://NetFactory.dk/




 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:44 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *