You may want to check on the version you are running. There have been
a few odd bugs in various MySQL versions in regards to limits and
order by filtering. Although it usually involved joins and/or unions.
If you can't or don't want to upgrade your MySQL version, you can try
restructuring y
Hi Guys,
Firstly, this is the only time I have ever encountered this problem and
searching archives or google shed no luck since yesterday so here I am .
I have a table described below:
mysql> describe containers;
+++--+-+-+
On Sunday 04 July 2004 02:52 am, Gary Mack wrote:
> Hi there,
>
> I recently learned about LIMIT so that I can page
> through records on a web page I am creating.
> However, when coupled with ORDER BY, the sorting
> does not work anymore. Can someone look at my below
> query and point out what I
Hi there,
I recently learned about LIMIT so that I can page through records on a web page I am
creating. However, when coupled with ORDER BY, the sorting does not work anymore.
Can someone look at my
below query and point out what I am doing wrong? Thanks. This is my first time
posting to
On Thu, 2002-12-05 at 19:39, Michelle de Beer wrote:
> > you mean mySQL does the search on 100 first entries
> > and then order the
> > results, instead of getting the results and
> > returning only the first 100 ?
> > If yes I too would like to know what's the right way
> > to do it in SQL then ?
older
versions of MySQL had a bug with order by and limit clauses, though...
--jeff
- Original Message -
From: "Michelle de Beer" <[EMAIL PROTECTED]>
To: "Alliax" <[EMAIL PROTECTED]>; "mysql list" <[EMAIL PROTECTED]>
Sent: Thursday, Dece
On Thu, Dec 05, 2002 at 02:00:43PM -0800, Michelle de Beer wrote:
> Select * from mytable ORDER by total desc limit 0, 100
See my other most recent reply; you can do it in two queries:
CREATE TEMPORARY TABLE Top100 SELECT * ... limit 0,100;
SELECT * FROM Top100 ORDER BY ...;
The temporary table
At 2:00 PM -0800 12/5/02, Michelle de Beer wrote:
How can I limit the result after the "order by" has
been executed? This stops efter 100 rows and the
result is not as I intended...
Select * from mytable ORDER by total desc limit 0, 100
Must this be done in PHP?
Perhaps you could tell us wha
> you mean mySQL does the search on 100 first entries
> and then order the
> results, instead of getting the results and
> returning only the first 100 ?
> If yes I too would like to know what's the right way
> to do it in SQL then ?
That is correct. This is what I have:
One table with 1000 recor
I am not sure I understand your question, I thought the line you showed
would give proper results (100 total-ordered lines) but maybe :
So there is a similar thread running now, Re: SQL Select Idea [ORDER BY] by
Michael, he says creating a temporary table is the way to go :
"create temporary tabl
MYSQL
On Thu, 2002-12-05 at 17:00, Michelle de Beer wrote:
> How can I limit the result after the "order by" has
> been executed? This stops efter 100 rows and the
> result is not as I intended...
>
> Select * from mytable ORDER by total desc limit 0, 100
>
> Must this be done in PHP?
>
> Thanks
How can I limit the result after the "order by" has
been executed? This stops efter 100 rows and the
result is not as I intended...
Select * from mytable ORDER by total desc limit 0, 100
Must this be done in PHP?
Thanks for all replys to my topics, btw.
Any thoughts?
// Michelle
sql, query
___
issue is solved.
check change log here:
http://phpmyadmin.sourceforge.net/ChangeLog.txt
regards,
shahzad
-Original Message-
From: Henning Schroeder [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 05, 2001 3:23 PM
To: [EMAIL PROTECTED]
Subject: RE: limit and order by issuse
>
This is fixed in PhpMyAdmin 2.2.0
- Original Message -
From: "Henning Schroeder" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 06, 2001 12:23 AM
Subject: RE: limit and order by issuse
>
> >sh> Here is my query:
> >
>sh> Here is my query:
>
>sh> SELECT
>sh> articleId,arttitle,artsourceId,artstatus,artauthorId,arteventdate,artpre
>sh> ss,artpageno,artrankId,artabstract,
>sh> artfulltext,artisdisplay,arteditionId,arttypeid,artsubjectid ,
>sh> asubjectId,asubjectname , FLOOR((TO_DAYS(CURRENT_DATE()) -
>sh> TO_D
Hi!
> "sh" == shahzazd@shebaak com <[EMAIL PROTECTED]> writes:
sh> Thanks for quick response.
sh> Here is my query:
sh> SELECT
sh> articleId,arttitle,artsourceId,artstatus,artauthorId,arteventdate,artpre
sh> ss,artpageno,artrankId,artabstract,
sh> artfulltext,artisdisplay,arteditionId,artt
I see... if adding "ORDER BY articleId DESC LIMIT 0, 20" causes a query to
start returning 0 rows, then that sounds like something is wrong.
Try using the REPAIR TABLE command on all your tables from inside MySQL,
e.g.:
REPAIR TABLE article;
REPAIR TABLE asubject;
REPAIR TABLE atype;
REPAIR TABL
[table sql stupid spam filter]
On Tue, 4 Sep 2001, [EMAIL PROTECTED] wrote:
> order by articleId desc limit 1 , 20
That will cause no rows to be returned if there are less than 20 results.
Use this instead:
ORDER BY articleId DESC LIMIT 0, 20
It starts counting at 0 instead of 1.
-
al Message-
From: Philip Mak [mailto:[EMAIL PROTECTED]] On Behalf Of
Philip Mak
Sent: Tuesday, September 04, 2001 3:25 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: limit and order by issuse
On Tue, 4 Sep 2001 [EMAIL PROTECTED] wrote:
> I am trying to use limit and order by in the s
On Tue, 4 Sep 2001 [EMAIL PROTECTED] wrote:
> I am trying to use limit and order by in the same query for paging of
> records. But faceing the problem that query does not return any row.
> After removing of limit every thing is working fine.
>
> Is it really a bug. Any solution.
hello,
I am trying to use limit and order by in the same query for paging of records. But
faceing the problem that query does not return any row.
After removing of limit every thing is working fine.
Is it really a bug. Any solution.
mysql version 3.23.38
regards,
shahzad
21 matches
Mail list logo