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

ÊÕ¼¯Ç¶ÈëʽÊý¾Ý¿âSqliteÒÆÖ²×ÊÁÏ

sqlite-3.3.6±àÒë°²×°Óë½»²æ±àÒëÈ«¹ý³ÌÏêϸ¼Ç¼
ÏÂÎĽéÉܵÄÄÚÈݶ¼ÊÇ»ùÓÚ Linux RedHat 9.0 ƽ̨µÄ¡£
Ò»¡¢PC»ú±àÒë°²×°
ÇëÔĶÁÔÚ°²×°°üÀïµÄ INSTALL Îļþ¡£»òÕßʹÓÃPEAR installer with "pear install sqlite"¡£SQLiteÒѾ­ÄÚÖÃÁË£¬Äã²»ÐèÒª°²×°Èκθ½¼ÓµÄÈí¼þ£¨additional software£©¡£
Windows users¿ÉÒÔÏÂÔØSQLiteÀ©Õ¹DLL£¨php_sqlite.dl£©¡£
ÕâÀï¼òµ¥½éÉÜһϣº
¼ÙÉèÄãµÃµ½µÄÊÇÔ´´úÂësqlite-3.3.6.tar.gz£¬ÕâÀォ¸æËßÄãÔõô±àÒëËü¡£
½âѹsqlite-3.3.6.tar.gz µ½ /homeĿ¼ÏÂ
For example:
tar zxvf sqlite-3.3.6.tar.gz -C /home           
cd /home
mkdir sqlite-ix86-linux
cd /home/sqlite-ix86-linux/
../sqlite-3.3.6/configure --prefix=/home/sqlite-ix86-linux/
±àÒë²¢°²×°£¬È»ºóÉú³É°ïÖúÎĵµ
make && make install && make doc
Èç¹û³öÏÖÏÂÁдíÎó
../sqlite-3.3.6/src/tclsqlite.c: In function `DbUpdateHandler':
../sqlite-3.3.6/src/tclsqlite.c:333: warning: passing arg 3 of `Tcl_ListObjAppendElement' makes pointer from integer without a cast
../sqlite-3.3.6/src/tclsqlite.c: In function `tclSqlFunc':
../sqlite-3.3.6/src/tclsqlite.c:419: warning: passing arg 1 of `Tcl_NewByteArrayObj' discards qualifiers from pointer target type
Õâ¸ö¶¼ÊÇtclÏà¹ØµÄ´íÎó,¿ÉÒÔÏÈ°²×°ActiveTclÒÔ½â¾ö.¼ÙÈçÄã²»ÐèÒªtclÖ§³Ö,ÄÇôÕâ¸ö´íÎó¿ÉÒÔÕâÑù±ÜÃâ:
cd /home/sqlite-ix86-linux/
    ../sqlite-3.3.6/configure --disable-tcl --prefix=/home/sqlite-ix86-linux/
±àÒë²¢°²×°£¬È»ºóÉú³É°ïÖúÎĵµ
make && make install && make doc
²»³öÒâÍâ,½«²»»á³öÏÖ´íÎó,ÄÇô
¿âÎļþÒѾ­Éú³ÉÔÚ /home/sqlite-ix86-linux/lib Ŀ¼ÏÂ
¿ÉÖ´ÐÐÎļþsqlite3ÒѾ­Éú³ÉÔÚ /home/sqlite-ix86-linux/bin Ŀ¼ÏÂ
ÏÂÃæ´´½¨Ò»¸öеÄÊý¾Ý¿âÎļþÃû½Ð"zieckey.db" (µ±È»Äã¿ÉÒÔʹÓò»Í¬µÄÃû×Ö) À´²âÊÔÊý¾Ý¿â.
Ö±½ÓÊäÈë: /home/sqlite-ix86-linux/bin/sqlite3 test.db
Èç¹û³öÏÖÏÂÃæ×ÖÑù±íÃ÷±àÒë°²×°ÒѾ­³É¹¦ÁË.
SQLite version 3.3.6
Enter ".help" for instructions
sqlite>
¶þ¡¢½»²æ±àÒësqlite.3.3.6.tar.gz¿âÎļþ
tar zxvf sqlite-3.3.6.tar.gz -C /home     (ÕâÒ»²½Ç°ÃæÒѾ­ÓÐÁË,Î


Ïà¹ØÎĵµ£º

SQLiteÖеÄʱ¼äÈÕÆÚº¯Êý

SQLite°üº¬ÁËÈçÏÂʱ¼ä/ÈÕÆÚº¯Êý£º
datetime().......................²úÉúÈÕÆÚºÍʱ¼ä
date()...........................²úÉúÈÕÆÚ
time()...........................²úÉúʱ¼ä
strftime().......................¶ÔÒÔÉÏÈý¸öº¯Êý²úÉúµÄÈÕÆÚºÍʱ¼ä½øÐиñʽ»¯
datetime()µÄÓ÷¨ÊÇ£ºdatetime(ÈÕÆÚ/ʱ¼ä,ÐÞÕý·û,ÐÞÕý·û...) ......

SQLiteÖеÄÈ«ÎÄËÑË÷

    °ÝGoogleµÄScott Hessͬ־Ëù´Í£¬SQLiteÒ²ÍƳöÁËÈ«ÎÄËÑË÷¹¦ÄÜ¡£
    SQLiteͨ¹ý½¨Á¢Ò»¸öÐéÄâ±í£¬½«ÊäÈëµÄÎÄ×Ö¸ù¾Ý¿Õ¸ñ¡¢±êµã·ûºÏµÈ¹æÔò½øÐзִʣ¬×éÖ¯³ÉÒ»¿ÃBÊ÷£¬ÒÔ´ËÀ´Ìá¸ßËÑË÷Ëٶȡ£
    ÈçºÎʹÓÃÕâÒ»¹¦ÄÜ£¬ÐÔÄÜÉÏÈçºÎ£¬´ó¼Ò¸÷×ÔÑо¿È¥°É¡£
    ÔÚÕâÀ ......

Sqlite DBʹÓÃÀý×Ó

Ç°Ò»Õó×Ö×öÏîÄ¿(ǶÈëʽlinux)£¬ÓÉÓÚÒª±£´æ´óÁ¿µÄÊý¾Ý£¬¶øÇÒ×Ҫ±£´æ30ÌìµÄʱ¼ä¡£±¾À´´òËã±£´æµ½ÎļþÖУ¬Ã¿´ÎÆô¶¯Ó¦ÓóÌÐòµÄʱºòÖØнâÎöÒ»±é£¬¿ÉÊǵ±Êý¾ÝÁ¿ºÜ´óµÄʱºò£¬¾Í³öÏÖЧÂʵÄÎÊÌâÁË¡£ËùÒÔ×îºó»¹ÊÇ·ÅÆúÁËʹÓÃÎļþµÄ´òË㣬¾ö¶¨Ê¹ÓÃÊý¾Ý¿â´æÈ¡Êý¾Ý¡£
linuxϵÄÊý¾Ý¿âÒ²ºÜ¶à£¬ÓпªÔ´µÄ£¬Ò²ÓÐÊշѵġ£¶ÔÓÚÎÒÃÇÀ´Ëµ£¬¿Ï ......

SQLite²Ù×÷Ö¸ÄÏ(SQLite version 3.6.21)

1¡¢.back ?DB? FILE  ±¸·ÝDB(ĬÈÏΪmain)µ½Îļþ
2¡¢.bail ON|OFF  Óöµ½Ò»¸ö´íÎó¿ÛÍ£Ö¹£¬¸ÃֵĬÈÏΪOFF
3¡¢.databases  Áоٸ½¼Óµ½Êý¾Ý¿âµÄÊý¾Ý¿âÃûºÍÎļþÃû
4¡¢.dump ?TABLE? ...  ÓÃSQLÎı¾¸ñʽÁоÙÊý¾Ý¿â£¬Èç¹ûÖ¸¶¨TABLE£¬½ö½öÁоÙÆ¥ÅäµÄ±í£¬LIKEÀàÐÍTABLE
5¡¢.echo ON|OFF  ÉèÖÃechoµÄ״̬ ......

SQLITEÈëÃÅ Öð²½½²½âSQLITEÃüÁîÐÐ(¶þ)

¿ÉÒÔ½Ó×ÅÉÏÒ»²½²Ù×÷£¬Ö±½ÓÏòDOS´°¿ÚÊäÈë.helpÃüÁîÀ´²é¿´SQLiteµÄËùÓÐÃüÁîÐм°½âÊÍÈçÏ£º
F:\>sqlite3
SQLite version 3.6.16
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .help
Ò²¿ÉÒÔctrl+c½áÊøÃüÁÏëDOS´°¿Ú ÊäÈësqlite3Ö´ÐкóÔÙÊäÈë.helpÃüÁîÈçÏ£º
F:\>sqli ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ