Re: LIMIT alternative

2005-09-02 Thread Vladimir B. Tsarkov
Hello!

Bastian Balthazar Bux, Pooly, Shawn Green, Peter Brawley, I thank you all!

In fact, I don't understand why this command is not standardized (ANSI 
SQL, etc.).

-- 
Удачи!
Владимир

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



LIMIT alternative

2005-09-01 Thread Vladimir B. Tsarkov
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!

-- 
Good Luck!
Vladimir

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: LIMIT alternative

2005-09-01 Thread Bastian Balthazar Bux
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!
 

take a look at the code of adodb
http://adodb.sourceforge.net

and to it's implementation of:
SelectLimit($sql,$numrows=-1,$offset=-1,$inputarr=false)


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: LIMIT alternative

2005-09-01 Thread Pooly
2005/9/1, Vladimir B. Tsarkov [EMAIL PROTECTED]:
 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.

FTFM : 
 For compatibility with PostgreSQL, MySQL also supports the LIMIT
row_count OFFSET offset syntax.

but if you want to be fully compatible with many others RDBMS, go  for
something like adodb, or some others DB interface in PHP




 
 Thanks!
 
 --
 Good Luck!
 Vladimir
 
 Please avoid sending me Word or PowerPoint attachments.
 See http://www.gnu.org/philosophy/no-word-attachments.html
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 
 


-- 
Pooly
Webzine Rock : http://www.w-fenec.org/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: LIMIT alternative

2005-09-01 Thread SGreen
Vladimir B. Tsarkov [EMAIL PROTECTED] wrote on 09/01/2005 06:16:12 AM:

 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!
 
 -- 
 Good Luck!
 Vladimir
 
 Please avoid sending me Word or PowerPoint attachments.
 See http://www.gnu.org/philosophy/no-word-attachments.html
 

Not that I know if. MySQL uses limit, MS SQL Server uses top, 

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

Re: LIMIT alternative

2005-09-01 Thread Peter Brawley




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!

  



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


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]