List:General Discussion« Previous MessageNext Message »
From:Peter Brawley Date:September 1 2005 7:05pm
Subject:Re: LIMIT alternative
View as plain text  

/>Is there any portable alternative to LIMIT? I'd like
 >to create a portable PHP pager for a web site .../

No, there's not a 'super SQL' which all SQL engines understand. To hide 
the details of LIMIT | TOP from your apps, you can write a PHP funcion 
which applies or updates the appropriate LIMIT | TOP clause in a given 
query, depending on what the DBMS is. If you are writing against MySQL 
5.0.2 or later, you might alternatively write MSSQL and MySQL stored 
procs for that task.



Vladimir B. Tsarkov wrote:

>I've heard that LIMIT is a MySQL specific, and cannot be used in any other 
>DBMS. Is there any portable alternative to LIMIT? I'd like to create a 
>portable PHP pager for a web site, but all the tutorials that I've found, 
>contain solutions based on the LIMIT usage.

Attachment: [text/html]
No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.344 / Virus Database: 267.10.16/83 - Release Date: 8/26/2005
table in usepriya.soma31 Aug
  • Re: table in useGleb Paharenko31 Aug
  • LIMIT alternativeUnknown Sender1 Sep
    • Re: LIMIT alternativeBastian Balthazar Bux1 Sep
    • Re: LIMIT alternativePooly1 Sep
    • Re: LIMIT alternativeSGreen1 Sep
    • Re: LIMIT alternativePeter Brawley1 Sep
      • Re: LIMIT alternativeUnknown Sender2 Sep
      • Re: LIMIT alternativeUnknown Sender2 Sep
  • LIMIT alternativeUnknown Sender1 Sep