RE: LIMIT Question

2006-06-29 Thread William R. Mussatto
Dirk Bremer - Senior Systems Engineer - ESS/AMS - NISC Lake St. Louis MO > - USA Central Time Zone > 636-755-2652 fax 636-755-2503 > > [EMAIL PROTECTED] > www.nisc.coop > >> -Original Message- >> From: Dan Buettner [mailto:[EMAIL PROTECTED] >> Sent: Wedne

RE: LIMIT Question

2006-06-28 Thread Dirk Bremer
.x at this point in time and this is a non-critical issue for me. Thanks for you help and advice. If someone has another solution, please chime in. Dirk Bremer - Senior Systems Engineer - ESS/AMS - NISC Lake St. Louis MO - USA Central Time Zone 636-755-2652 fax 636-755-2503 [EMAIL PROTECTED] www.

Re: LIMIT Question

2006-06-28 Thread Dan Buettner
Dirk, you could try this: (SELECT * FROM customertable WHERE ORDER BY customertableid DESC LIMIT 50) ORDER BY customertableid ASC; Like one sometimes does with UNIONs, but without any UNIONs. Didn't know whether it would work, but it does (on 5.0.21 anyway). That will give you the 50 entries

Re: LIMIT Question

2006-06-28 Thread Chris White
On Wednesday 28 June 2006 01:39 pm, Dirk Bremer wrote: > Dan, > > That might be close. The rows are inserted with an auto-increment > primary key, but I have no ready way of knowing what the latest 50-IDs > are. There are also various date columns, but I won't readily know the > dates in this scena

RE: LIMIT Question

2006-06-28 Thread Dirk Bremer
EMAIL PROTECTED] www.nisc.coop > -Original Message- > From: Dan Buettner [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 28, 2006 15:28 > To: Dirk Bremer > Cc: mysql@lists.mysql.com > Subject: Re: LIMIT Question > > Depends what you mean by "last" -

Re: LIMIT Question

2006-06-28 Thread Dan Buettner
Depends what you mean by "last" - you could show the 50 with the latest datestamps by ending your query with something like: ORDER BY datestampcolumn DESC LIMIT 50; or the 50 with the highest ID numbers, same thing: ORDER BY id DESC LIMIT 50; only real problem there is then they're sorted high

Re: LIMIT question

2003-07-14 Thread Krasimir_Slaveykov
Hello Andrey, Friday, July 11, 2003, 7:28:27 PM, you wrote: http://www.mysql.com/doc/en/SELECT.html . The LIMIT clause can be used to constrain the number of rows returned by the SELECT statement. LIMIT takes one or two numeric arguments. The arguments must be integer consta

Re: LIMIT question

2003-07-12 Thread Victoria Reznichenko
Andrey <[EMAIL PROTECTED]> wrote: > > I have a following question: > > I have a table with thousands of rows which i need to show in a String Grid ( I use > Borland Delphi with MyDac component which implements MySQL interface). > > If i make a query > SELECT * FROM tbl WHERE col1="something"