Artem, Friday, April 12, 2002, 8:05:37 PM, you wrote: AVR> min return not value from table.
AVR> mysql> select min(ord) from cSectText where SectID=932; AVR> +---------------------+ AVR> | min(ord) | AVR> +---------------------+ AVR> | -200204120000051744 | AVR> +---------------------+ AVR> 1 row in set (0.00 sec) AVR> mysql> select ord from cSectText where SectID=932 order by ord limit 10; AVR> +---------------------+ AVR> | ord | AVR> +---------------------+ AVR> | -200204120000051754 | AVR> | -200204120000051752 | AVR> | -200204120000051750 | AVR> | -200204120000051748 | AVR> | -200204120000051746 | AVR> | -200204120000051744 | AVR> | -200204120000051742 | AVR> | -200204120000051740 | AVR> | -200204120000051738 | AVR> | -200204120000051730 | AVR> +---------------------+ AVR> 10 rows in set (0.00 sec) AVR> mysql> select ord from cSectText where SectID=1 order by ord limit 10; AVR> +---------------------+ AVR> | ord | AVR> +---------------------+ AVR> | -200204120000051794 | AVR> | -200204120000051754 | AVR> | -200204120000051752 | AVR> | -200204120000051750 | AVR> | -200204120000051748 | AVR> | -200204120000051746 | AVR> | -200204120000051744 | AVR> | -200204120000051742 | AVR> | -200204120000051740 | AVR> | -200204120000051738 | AVR> +---------------------+ AVR> 10 rows in set (0.00 sec) AVR> mysql> select min(ord) from cSectText where SectID=1; AVR> +---------------------+ AVR> | min(ord) | AVR> +---------------------+ AVR> | -200204120000051808 | AVR> +---------------------+ AVR> 1 row in set (0.00 sec) AVR> mysql> select * from cSectText where ord=-200204120000051808 and SectID=1; AVR> Empty set (0.00 sec) AVR> mysql> show create table cSectText; AVR> | cSectText | CREATE TABLE `cSectText` ( AVR> `SectID` int(11) NOT NULL default '0', AVR> `ID` int(11) NOT NULL default '0', AVR> `Date` date NOT NULL default '0000-00-00', AVR> `ord` bigint(17) NOT NULL default '0', AVR> PRIMARY KEY (`ID`,`SectID`), AVR> UNIQUE KEY `d` (`SectID`,`ord`), AVR> UNIQUE KEY `a` (`SectID`,`Date`,`ID`) AVR> ) TYPE=MyISAM COMMENT='ΣΣΣ' | AVR> 1 row in set (0.00 sec) AVR> mysql> show variables like 'version'; AVR> +---------------+----------------+ AVR> | Variable_name | Value | AVR> +---------------+----------------+ AVR> | version | 3.23.49yes-log | AVR> +---------------+----------------+ AVR> 1 row in set (0.00 sec) As Monty explained: The problem is not with min() function. MySQL 3.23 doesn't support the full range for bigint. Despite the fact that in v3.23 all comparisons are done with double arithmetic it's not enough to be able to be able to handle the above. In some cases it temporary fixed adding " around the bigint string. -- For technical support contracts, goto https://order.mysql.com/ This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php