Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

sqliteÊý¾Ý¿â²éѯ±í¿¿Ç°

¸ÕÈëÃÅ ÏëʵÏÖÐÂÎűíÐÂÎÅÖö¥µÄ¹¦ÄÜ

select * from web_news  order by id desc limit 0,6

web_news ±íÀïÓÐTOPÁÐ ÔõÑùÈÃTOPÁмǼΪ1µÄΪÖÃǰ  ¸÷λ´ó´óÃǰï°ïæ ·Ö²»¶à Çë°üº­£¡£¡
order by top²»ÐÐÂð£¿

idºÍtopÄǸöÓÅÏÈ£¿

SQL code:
select * from web_news order by top!=1 ,id desc limit 0,6;



ÄãµÄÒâ˼ÊDz»ÊÇtop=1µÄÊÇÖö¥µÄÄØ£¿
SELECT * from  web_news ORDER BY `topid` DESC LIMIT 0 , 6

²¹³äһϣ¡

ÄãµÄÒâ˼ÊDz»ÊÇtop=1µÄÊÇÖö¥top=0µÄ²»Öö¥µÄÄØ£¿
SELECT * from  web_news ORDER BY 'top' DESC LIMIT 0 , 6



ÒýÓÃ
SQL codeselect*from web_newsorderbytop!=1 ,iddesc limit0,6;

THANK YOU  ½â¾öÁË!


Ïà¹ØÎÊ´ð£º

ÓйØSQliteµÄÒ»¸öÎÊÌâ

³ÌÐò´úÂëÈçÏ£º
sqlTime = "select SUM(onlineTimeSpan) from T_OnlineTimeSum where ipAddress = :a AND onlineDate BETWEEN :b AND :c";
                ......

ÊìϤSqliteµÄÇë½øÀ´£¡£¡£¡£¡£¡

´ó¼ÒºÃ£¡
  sqlite×Ö¶ÎΪfloatÐ͵ÄÖµÔõÑù·ÃÎÊ£¿
ÊÔ¹ýÓÃsqlite3_column_double£¬È··µ»ØµÄÊý¾Ý²»ÕýÈ·£»
ûÓùý,°ï¶¥.

Ò»Ñù°¡£¬·µ»ØÈ«ÊÇ string

ÄãµÄ´úÂëÊÇʲô£¿
double sqlite3_column_double(sqli ......

sqlite ²éѯijһÊý¾ÝËùÔÚµÄÐÐÊý

sqlite ²éѯijһÊý¾ÝËùÔÚµÄÐÐÊý£º

ÆäÖÐÊý¾Ý±íÖÐûÓÐרÃűêʶÌõÊýµÄË÷ÒýÖµ£¬ÎÒÃǸù¾ÝÆäËûһЩ×ֶβéÕÒµ½Á˸ÃÊý¾Ý£¬ÏÖÔÚÐèÒª·µ»Ø¸ÃÊý¾ÝËùÔÚµÄÐÐÊý¡£

ÆäÖÐsqlite manager ÖÐÓÐÒ»¸örowid£¬µ«ÊÇÕâ¸ö²¢ÎÞ·¨· ......

ÓùýsqliteµÄÅóÓÑ¿´ÏÂ

×î¼òµ¥µÄÎÊÌâ¡£Ò²ÓеãÓôÃÆ¡£
ÎÒÏë´´½¨Ò»¸öÊý¾Ý¿â
ÎÒÏÖÔÚÖ»ÓÐÒ»¸ösqlite3.exeÎļþ¡£
ÎÒʹÓõķ½·¨ÊÇË«»÷Õâ¸öÎļþ
ʹÓõÄÃüÁîΪ£º
sqlite3 f:\a.db »Ø³µ
¿ÉÊǽá¹ûÈ´ÏÔʾΪ
  ...>
sqli ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ