免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1447 | 回复: 0
打印 上一主题 下一主题

SQLite资料 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-04-13 17:33 |只看该作者 |倒序浏览
翻译:523065@163.com  首次翻译时间:2004年5月5日  再次翻译时间:...................  版本:0.1  翻译手记:  这是我的第一编翻译作品。有许多地方不会翻译,唯有参考其他人的作品^_^。  但体会很深。原来自己的英语水平是那么的低!!做翻译是多么辛苦……  同时也收获不少。至少打字的速度提高了不少。  在这里我要感谢那做翻译的无私奉献的人们,同时我也希望我自己会做得越来越好!!  (PS:由于水平有限,有翻译不对的地方请指出来。)  SQLite  介绍  这是嵌入式SQL数据库引擎SQLite(SQLite Embeddable SQL Database Engine)的一个扩展。SQLite是一个实现嵌入式SQL数据库引擎的 C语言库(C library)。用SQLite连接的程序可以使用SQL数据库,但不需要运行一个单独的关系型数据库管理系统进程(separate RDBMS process)。  SQLite不是一个用于连接到大型数据库服务器(big database server)的客户端库(client library)。SQLite是一个服务器。SQLite直接读写(reads and writes directly)在硬盘上的数据库文件。  注:更多关于SQLite的资料请查看SQLite的网站(http://sqlite.org/)。  安装  请阅读在安装包里的 INSTALL 文件。或者使用PEAR installer with "pear install sqlite"。SQLite已经内置了,你不需要安装任何附加的软件(additional software)。  Windows users可以下载SQLite扩展DLL(php_sqlite.dl)。  需求  为了可以使用那些函数,你必须编译带上SQLite支持PHP(compile PHP with SQLite support),或者在你的php.ini加载SQLite扩展。  资源类型  有两个在SQLite界面(the SQLite Interface)可用的资源。第一个是数据库连接(the database connection),第二是计算结果设置(the result set)。  预定义常量  函数sqlite_fetch_array()和sqlite_current()使用一个常量表示不同的返回类型。下面的常量(表格 1.)已经被定义:  表格 1. SQLite 常量  常量名 意义  SQLITE_ASSOC Columns are returned into the array having the fieldname as the array index.  SQLITE_BOTH Columns are returned into the array having both a numerical index and the fieldname as the array index.  SQLITE_NUM Columns are returned into the array having a numerical index to the fields. This index starts with 0, the first field in the result.  运行时配置  这些函数的行为受到全局配置文件 php.ini 的影响。  表格 2. SQLite Configuration Options  Name Default Changeable  sqlite.assoc_case 0 PHP_INI_ALL  For further details and definition of the PHP_INI_* constants see ini_set().  以下是该配置选项的简要解释。  sqlite.assoc_case int  Whether to use mixed case (0), upper case (1) or lower case (2) hash indexes.  This option is primarily useful when you need compatibility with other database systems, where the names of the columns are always returned as uppercase or lowercase, regardless of the case of the actual field names in the database schema.  The SQLite library returns the column names in their natural case (that matches the case you used in your schema). When sqlite.assoc_case is set to 0 the natural case will be preserved. When it is set to 1 or 2, PHP will apply case folding on the hash keys to upper- or lower-case the keys, respectively.  Use of this option incurs a slight performance penalty, but is MUCH faster than performing the case folding yourself using PHP script.  目录  sqlite_array_query —— 发送一条 SQL 查询,并返回一个数组。  sqlite_busy_timeout —— 设置超时时间(busy timeout duration),或者频繁的用户失去权限(disable busy handlers)。  sqlite_changes —— 返回被最新的SQL 查询(changed by the most recent SQL statement)改变的行数。<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px%

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/86575/showart_1899500.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP