Unix Technical Forum

Re: a strange problem

This is a discussion on Re: a strange problem within the MySQL General forum forums, part of the MySQL category; --> Not knowing your msqyl version, perhaps it's the form of your LIMIT clause. try LIMIT 0,10 instead. Phil 2008/4/22 ...


Go Back   Unix Technical Forum > Database Server Software > MySQL > MySQL General forum

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-24-2008, 06:08 PM
Phil
 
Posts: n/a
Default Re: a strange problem

Not knowing your msqyl version, perhaps it's the form of your LIMIT clause.

try LIMIT 0,10 instead.

Phil

2008/4/22 liaojian_163 <jianliao82@163.com>:

> hi,all.
> In my mysql server,I have a strange problem.
> can someone help me?
> Thank you.
>
> mysql> select id,classid,newstime from phome_ecms_zhichang where
> classid=41 and id >2500 order by id desc limit 10;
> +------+---------+---------------------+
> | id | classid | newstime |
> +------+---------+---------------------+
> | 2543 | 41 | 2008-04-22 21:55:22 |
> | 2540 | 41 | 2008-04-19 12:29:30 |
> | 2537 | 41 | 2008-04-18 17:38:50 |
> | 2536 | 41 | 2008-04-18 17:37:56 |
> | 2534 | 41 | 2008-04-18 12:22:24 |
> | 2533 | 41 | 2008-04-18 01:19:49 |
> | 2532 | 41 | 2008-04-18 01:18:42 |
> | 2527 | 41 | 2008-04-16 18:45:34 |
> | 2526 | 41 | 2008-04-16 18:43:03 |
> | 2523 | 41 | 2008-04-16 08:47:16 |
> +------+---------+---------------------+
> 10 rows in set (0.00 sec)
>
> mysql> select id,classid,newstime from phome_ecms_zhichang where
> classid=41 order by id desc limit 10;
> +------+---------+---------------------+
> | id | classid | newstime |
> +------+---------+---------------------+
> | 2540 | 41 | 2008-04-19 12:29:30 |
> | 2537 | 41 | 2008-04-18 17:38:50 |
> | 2536 | 41 | 2008-04-18 17:37:56 |
> | 2534 | 41 | 2008-04-18 12:22:24 |
> | 2533 | 41 | 2008-04-18 01:19:49 |
> | 2532 | 41 | 2008-04-18 01:18:42 |
> | 2527 | 41 | 2008-04-16 18:45:34 |
> | 2526 | 41 | 2008-04-16 18:43:03 |
> | 2523 | 41 | 2008-04-16 08:47:16 |
> | 2522 | 41 | 2008-04-15 15:34:55 |
> +------+---------+---------------------+
>
>
> mysql> select id,classid,newstime from phome_ecms_zhichang where
> classid=41 and id >0 order by id desc limit 10;
> Empty set (0.00 sec)
>
>
> desc phome_ecms_zhichang;
>
> +-------------+--------------+------+-----+---------------------+----------------+
> | Field | Type | Null | Key | Default | Extra
> |
>
> +-------------+--------------+------+-----+---------------------+----------------+
> | id | int(11) | NO | PRI | NULL |
> auto_increment |
> | classid | smallint(6) | NO | MUL | 0 |
> |
> | onclick | int(11) | NO | | 0 |
> |
> | newspath | varchar(50) | NO | | |
> |
> | keyboard | varchar(255) | NO | | |
> |
> | keyid | varchar(255) | NO | | |
> |
> | userid | int(11) | NO | | 0 |
> |
> | username | varchar(30) | NO | | |
> |
> | ztid | varchar(255) | NO | | |
> |
> | checked | tinyint(1) | NO | MUL | 0 |
> |
> | istop | tinyint(4) | NO | | 0 |
> |
> | truetime | int(11) | NO | MUL | 0 |
> |
> | ismember | tinyint(1) | NO | | 0 |
> |
> | dokey | tinyint(1) | NO | | 0 |
> |
> | userfen | int(11) | NO | | 0 |
> |
> | isgood | tinyint(1) | NO | | 0 |
> |
> | titlefont | varchar(50) | NO | | |
> |
> | titleurl | varchar(200) | NO | | |
> |
> | filename | varchar(60) | NO | | |
> |
> | filenameqz | varchar(28) | NO | | |
> |
> | fh | tinyint(1) | NO | | 0 |
> |
> | groupid | smallint(6) | NO | | 0 |
> |
> | newstempid | smallint(6) | NO | | 0 |
> |
> | plnum | int(11) | NO | | 0 |
> |
> | firsttitle | tinyint(1) | NO | | 0 |
> |
> | isqf | tinyint(1) | NO | | 0 |
> |
> | totaldown | int(11) | NO | | 0 |
> |
> | title | varchar(200) | NO | | |
> |
> | newstime | datetime | NO | MUL | 0000-00-00 00:00:00 |
> |
> | titlepic | varchar(200) | NO | | |
> |
> | closepl | tinyint(1) | NO | | 0 |
> |
> | havehtml | tinyint(1) | NO | | 0 |
> |
> | lastdotime | int(11) | NO | | 0 |
> |
> | haveaddfen | tinyint(1) | NO | | 0 |
> |
> | infopfen | int(11) | NO | | 0 |
> |
> | infopfennum | int(11) | NO | | 0 |
> |
> | votenum | int(11) | NO | | 0 |
> |
> | ftitle | varchar(200) | NO | | |
> |
> | smalltext | text | NO | | NULL |
> |
> | writer | varchar(30) | NO | | |
> |
> | befrom | varchar(60) | NO | | |
> |
> | newstext | mediumtext | NO | | NULL |
> |
>
> +-------------+--------------+------+-----+---------------------+----------------+
>




--
Help build our city at http://free-dc.myminicity.com !

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:02 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com