From: Peter Brawley Date: September 1 2005 7:05pm Subject: Re: LIMIT alternative List-Archive: http://lists.mysql.com/mysql/188586 Message-Id: <43175115.5080807@earthlink.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=======AVGMAIL-4317511A2BAD=======" --=======AVGMAIL-4317511A2BAD======= Content-Type: multipart/alternative; boundary=------------090203030202020809050601 --------------090203030202020809050601 Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Vladimir, />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. PB ----- Vladimir B. Tsarkov wrote: >Hello! > >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. > >Thanks! > > > --------------090203030202020809050601 Content-Type: text/html; charset=KOI8-R Content-Transfer-Encoding: 7bit
--------------090203030202020809050601-- --=======AVGMAIL-4317511A2BAD======= Content-Type: text/plain; x-avg=cert; charset=us-ascii Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Content-Description: "AVG certification" 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 --=======AVGMAIL-4317511A2BAD=======--Hello! 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. Thanks!