Your Developer Exam showed me just how much there is to PHP. 您的开发人员考试表明我到底有多少是为PHP。”
罗斯

RocksDatabase类

说明

这个类可以简单的数据库,独立于任何数据库服务器访问。

  • string $username: the database user's username 财产阅读:字符串用户名:数据库用户的用户名
  • string $password: the database user's password 财产阅读:字符串密码:数据库用户的密码
  • string $hostname: the database host name 财产阅读:字符串$ HOSTNAME:数据库主机名
  • string $databaseName: the database name 财产阅读:字符串$数据库名:数据库名称
  • string $databaseType: the database type so mysql, mssql etc 属性如下:字符串美元databaseType:因此MySQL,MSSQL等数据库类型
  • Dominic Skinner 作者:玫瑰斯金纳
  • 0.2.1 版本:0.2.1

)位于/ RocksDatabase.php(18行)

类常量摘要
DatabaseConfigName =“数据库名”
DatabaseSectionName =“数据库”
DatabaseTypeConfigName =“DatabaseType”
DebugConfigName =“调试”
HostnameConfigName =“主机名”
PasswordConfigName =“密码”
UsernameConfigName =“用户名”
方法摘要
__construct ([ string $configFileName = null ]) RocksDatabase __construct ([ 字符串 美元configFileName = NULL)
Execute ( string $query ) INT 执行字符串 $查询
GetTableFieldInfo ( string $tableName ) 数组, GetTableFieldInfo字符串 $ TableName的
RegisterSQLErrorCallbackFunction ( function $functionReference ) 无效 RegisterSQLErrorCallbackFunction函数 functionReference)
Select ( string $query , [ string $fieldDefinition = null ], [ bool $alwaysReturnArray = false ]) 混合 选择字符串 $查询 ,[ 字符串 美元fieldDefinition = NULL],[BOOL 美元alwaysReturnArray = FALSE])
SelectArray ( string $query ) SelectArray 数组字符串 $查询
__get ( 无效 的__get ) $ VAR)
方法
(line 68 ) 构造__construct(68行)

该构造给出了数据库美元configFileName它将使用。

  • public 访问:公共
__construct ([ string $configFileName = null ]) RocksDatabase __construct([ 字符串 美元configFileName = NULL)
  • $configFileName : the configFileName to use if null use the one in the default location 字符串 $ configFileName:configFileName使用如果空在默认位置使用一个
(line 425 ) 执行 (425行)

Execute方法执行SQL,并返回最后插入的ID,如果它是一个插入

  • the last inserted id if it was a insert 回报:最后插入的ID,如果它是一个插入
  • public 访问:公共
Execute ( string $query ) INT 执行字符串 $查询
  • $query : the SQL to execute 字符串 查询 :SQL执行
(line 144 ) getLeftEscapeCharacter(144线)
  • public 访问:公共
getLeftEscapeCharacter () 无效 getLeftEscapeCharacter()
(line 149 ) getRightEscapeCharacter(149行)
  • public 访问:公共
getRightEscapeCharacter () 无效 getRightEscapeCharacter()
(line 331 ) GetTableFieldInfo(331行)

GetTableFieldInfo方法返回一个给定的表的字段的详细信息。

  • this returns a array of field descriptions 回报:返回一个数组字段说明
  • public 访问:公共
GetTableFieldInfo ( string $tableName ) 数组,GetTableFieldInfo( 字符串 $ TableName的
  • $tableName : the table name to return the fields for 字符串 美元的 tablename:表名返回的字段
(line 360 ) RegisterSQLErrorCallbackFunction(360行)

RegisterSQLErrorCallbackFunction方法调用,它是通过一个SQL错误,因此开发人员能够正确处理错误的函数。

  • public 访问:公共
RegisterSQLErrorCallbackFunction ( function $functionReference ) 无效 RegisterSQLErrorCallbackFunction( 函数 functionReference)
  • $functionReference : the function to call on a error 函数 $ functionReference:要调用的函数在一个错误
(line 385 ) 选择 (385行)

Select方法执行SQL,并返回一个值或数组

  • a array of either RocksDynamicClasses or RocksDBO objects. 返回:要么RocksDynamicClasses数组或RocksDBO对象。 如果选择只使用一个表,它会返回RocksDBO的对象。
  • public 访问:公共
Select ( string $query , [ string $fieldDefinition = null ], [ bool $alwaysReturnArray = false ]) 混合 选择字符串 $查询 ,[ 字符串 美元fieldDefinition = NULL],[BOOL 美元alwaysReturnArray = FALSE])
  • $query : the SQL to execute 字符串 查询 :SQL执行
  • $fieldDefinition : a field definition list, this is used internally usually. 字符串 $ fieldDefinition:字段定义列表,这是国内通常使用。
  • $alwaysReturnArray : if true it will always return an array BOOL 美元 alwaysReturnArray:如果为true,它总是返回一个数组
(line 371 ) SelectArray(371行)

SelectArray方法执行SQL总是返回一个结果数组

  • a array of either RocksDynamicClasses or RocksDBO objects 回报:要么RocksDynamicClasses数组或RocksDBO对象
  • public 访问:公共
SelectArray ( string $query ) SelectArray 数组字符串 $查询
  • $query : the SQL to execute 字符串 查询 :SQL执行
(line 166 ) __get(166行)
  • public 访问:公共
__get ( 无效 的__get( ) $ VAR)
  • $ VAR
类常量
= "DatabaseName" (line 54 ) DatabaseConfigName =“数据库名”(54行)

配置项在配置文件中使用的数据库名称

= "Database" (line 38 ) DatabaseSectionName =“数据库”(38行)

在配置文件中使用的数据库部分的名称

= "DatabaseType" (line 58 ) DatabaseTypeConfigName =“DatabaseType”(58行)

datbase类型配置在配置文件中使用的关键

= "Debug" (line 62 ) DebugConfigName =“调试”(62行)

在配置文件中使用调试配置的关键

= "Hostname" (line 50 ) HostnameConfigName =“主机名”(50行)

在配置文件中使用主机名配置的关键

= "Password" (line 46 ) PasswordConfigName =“密码”(46行)

在配置文件中使用的密码配置的关键

= "Username" (line 42 ) UsernameConfigName =“用户名”(42行)

在配置文件中使用的用户名配置的关键


没有意见已提供。
安全形象

作者由Dominic斯金纳
最后更新:2011年10月25日16点00分38秒