SQLite资料翻译

导读:
  这是我的第一编翻译作品。有许多地方不会翻译,唯有参考其他人的作品^_^。
  但体会很深。原来自己的英语水平是那么的低!!做翻译是多么辛苦……
  同时也收获不少。至少打字的速度提高了不少。
  在这里我要感谢那做翻译的无私奉献的人们,同时我也希望我自己会做得越来越好!!
  (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)改变的行数。
  sqlite_close —— 关闭一个打开的SQLite数据库。
  sqlite_column —— 在当前的行中取得一列(a column from the current row of a result set)。
  sqlite_create_aggregate —— Register an aggregating UDF for use in SQL statements。
  sqlite_create_function —— Registers a "regular" User Defined Function for use in SQL statements。
  sqlite_current —— 在返回的数组中取得当前的行(the current row from a result set as an array)。
  sqlite_error_string —— 返回错误代码的原始描述(the textual description of an error code)。
  sqlite_escape_string —— 释放一个用于查询的字符串(Escapes a string for use as a query parameter)。
  sqlite_fetch_array —— 取得下一行并设置成一个数组(the next row from a result set as an array)。
  sqlite_fetch_single —— 取得第一列并设置成一个字符串(Fetches the first column of a result set as a string)。
  sqlite_fetch_string —— sqlite_fetch_single()的别名。
  sqlite_field_name —— 取得结果中指定字段的字段名。
  sqlite_has_more —— 返回是否有更多可用的行(whether or not more rows are available)。
  sqlite_last_error —— 返回数据库的最新的错误代码(the error code of the last error for a database)。
  sqlite_last_insert_rowid —— 返回最新插入的行的行号(the most recently inserted row)。
  sqlite_libencoding —— 返回SQLite库(SQLite library)的编码(encoding)。
  sqlite_libversion —— 返回SQLite库(SQLite library)的版本。
  sqlite_next —— 返回下一行的行号。
  sqlite_num_fields —— 取得结果集中字段的数目。
  sqlite_num_rows —— 取得结果集中行的数目。
  sqlite_open —— 打开一个SQLite数据库。如果文件不存在则尝试创建之。
  sqlite_popen —— 用永久连接的方式打开一个SQLite数据库。如果文件不存在则尝试创建之。
  sqlite_query —— 发送一条 SQL 查询,并返回一个结果句柄(a result handle)。
  sqlite_rewind —— 倒回第一行(Seek to the first row number)。
  sqlite_seek —— 在缓存结果中查找特定的行号(Seek to a particular row number of a buffered result set)。
  sqlite_udf_decode_binary —— Decode binary data passed as parameters to an UDF。
  sqlite_udf_encode_binary —— Encode binary data before returning it from an UDF。
  sqlite_unbuffered_query —— 发送一条 SQL 查询,并不获取和缓存结果的行。
  本文来自:http://www.linuxpk.com/4922.html
  linux电子图书免费下载和技术讨论基地
   ·上一篇:DB2常用傻瓜问题1000问(之一)

本文转自
http://www.linuxpk.com/4922.html
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值