Odd Results on Mysql LIMIT and ORDER BY

2008-04-26 Thread j's mysql general
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;

Re: Odd Results on Mysql LIMIT and ORDER BY

2008-04-26 Thread Brent Baisley
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

Re: MYSQL Limit

2008-02-19 Thread Andy Wallace
Looks like you're missing a comma after comm_id, before the @num := line? andy Santosh Killedar wrote: I am trying the following code on 4.1.2 and getting a syntax error that I could not figure out. It works fine on 5.x. Any suggestion/alternate CREATE TEMPORARY TABLE Temp (Node INT, comm_id

RE: MYSQL Limit

2008-02-18 Thread Santosh Killedar
I am trying the following code on 4.1.2 and getting a syntax error that I could not figure out. It works fine on 5.x. Any suggestion/alternate CREATE TEMPORARY TABLE Temp (Node INT, comm_id INT, INDEX USING BTREE (comm_id)) ENGINE = MyISAM; INSERT INTO Temp SELECT recipient, id FROM

MYSQL Limit

2008-02-16 Thread Santosh Killedar
I have a MYsql table with following columns Node ID, Comment ID, Text, Date. Coment ID is primary key. For each Node ID there are one or more comment IDs (comments). There is a threshold (max_comments) that a node can have. How can I delete oldest comments associated with those nodes where this

RE: MYSQL Limit

2008-02-16 Thread Santosh Killedar
and (@last @keeplast) ; -Original Message- From: joe [mailto:[EMAIL PROTECTED] Sent: Saturday, February 16, 2008 8:12 PM To: 'Santosh Killedar' Subject: RE: MYSQL Limit http://www.xaprb.com/blog/2006/12/15/advanced-mysql-user-variable-techniques / -Original

mySQL LIMIT and ORDER BY Problem???

2004-07-04 Thread Gary Mack
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

Re: mySQL LIMIT and ORDER BY Problem???

2004-07-04 Thread John Hicks
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 am

Re: [PHP-DB] mysql limit

2004-07-02 Thread Bob Lockie
Moved from a PHP list to a MySQL list. :-) On 06/30/2004 09:55 PM John W. Holmes spoke: Bob Lockie wrote: If I select rows with a limit clause I need to know if there are more rows than the limit. Either do a SELECT COUNT(*) prior to your LIMIT query to see how many total rows there are, or use

Re: [PHP-DB] mysql limit

2004-07-02 Thread gerald_clark
If I want 20 rows to display, I ask for 21. If I get 21, I know to ask for another page. Bob Lockie wrote: Moved from a PHP list to a MySQL list. :-) On 06/30/2004 09:55 PM John W. Holmes spoke: Bob Lockie wrote: If I select rows with a limit clause I need to know if there are more rows than

Re: Mysql Limit

2002-01-03 Thread Joshua Chamas
Arvin Bautista wrote: I'm new to mysql/sql thing thus mysql can efficiently handles a database even it has a hundred tables Yes, but you need to make sure to set your table cache large enough to cache all these tables to stay fast. This is for MyISAM tables, the default. BDB supposedly

Mysql Limit

2002-01-02 Thread Arvin Bautista
I'm new to mysql/sql thing thus mysql can efficiently handles a database even it has a hundred tables thanks in advance Arvin - Before posting, please check: http://www.mysql.com/manual.php (the manual)