YAP  2.5
 All Data Structures Namespaces Files Functions Variables
CYapDB Class Reference
Inheritance diagram for CYapDB:
CYap_MsSQL CYap_mysql CYap_odbc

Public Member Functions

 CYapDB ()
 
 OpenDB ($Server, $User="", $Password="")
 
 SelectDb ($DBname)
 
 DbExecSql ($sql)
 
 QueryLimit ($select, $start=0, $many=-1)
 
 DbGetNumRow ($result)
 
 DbGetNumFields ($result)
 
 DbFetchField ($result, $FieldNo)
 
 DbFieldFlags ($result, $FieldNo)
 
 DbFreeResult ($result)
 
 DbEscape ($value)
 
 DbError ()
 
 DbaddSql ($row, $fieldsType, $KeyField)
 
 DbmodifySql ($row, $fieldsType)
 
 DbRegexCond ($FieldName, $pattern)
 
 DbBetweenCond ($FieldName, $ValueFrom, $ValueTo, $ValueType)
 

Data Fields

 $DbConn
 
 $Db_Open
 
 $txtError
 
 $Dbresult
 
 $CurrentRow
 
 $LastQuery
 

Detailed Description

Definition at line 38 of file CYap_db.php.

Member Function Documentation

CYapDB ( )

Definition at line 67 of file CYap_db.php.

DbaddSql (   $row,
  $fieldsType,
  $KeyField 
)

From an array of values, made the sql for adding the row

Parameters
arrayarray of values. The key is the field name
arraytype of each fields
stringname of the key field public

Definition at line 191 of file CYap_db.php.

DbBetweenCond (   $FieldName,
  $ValueFrom,
  $ValueTo,
  $ValueType 
)

Build the condition statement for $FieldName using the 'between' expression

Parameters
string$FieldName
mixed$ValueFrom
mixed$ValueTo
string$ValueType
Returns
string

Definition at line 257 of file CYap_db.php.

DbError ( )

Return the error descritpion from last command public

Returns
string

Definition at line 177 of file CYap_db.php.

DbEscape (   $value)

Escape the string using the db functions, if provided It don't apply the escape string if magic_quotes_gpc is enabled

Parameters
string$valuesql statement public
Returns
string the escaped string

Definition at line 163 of file CYap_db.php.

array sql statement per resource returned by DbExecSql (   $sql)

Execute the given query

Parameters
string$sqlsql statement public
Returns
bool true on success, false on failure

private

Definition at line 92 of file CYap_db.php.

DbFetchField (   $result,
  $FieldNo 
)

Get column information from a result and return as an object

Parameters
integer$result
integer$FieldNopublic
Returns
object DbMeta

Definition at line 133 of file CYap_db.php.

DbFieldFlags (   $result,
  $FieldNo 
)

Get the flags associated with the specified field in a result

Parameters
resource$result
integer$FieldNopublic
Returns
string

Definition at line 143 of file CYap_db.php.

DbFreeResult (   $result)

Free the given result

Parameters
integer$resultpublic
Returns
bool true on success, false on failure

Definition at line 152 of file CYap_db.php.

DbGetNumFields (   $result)

Retrieve the number of fields retrieved by the given result

Parameters
integer$resultpublic
Returns
integer

Definition at line 122 of file CYap_db.php.

DbGetNumRow (   $result)

Retrieve the number of rows retrieved by the given result

Parameters
integer$resultpublic
Returns
integer

Definition at line 113 of file CYap_db.php.

DbmodifySql (   $row,
  $fieldsType 
)

From an array of values, made the sql for modify the row

Parameters
arrayarray of values. The key is the field name
arraytype of each fields public

Definition at line 223 of file CYap_db.php.

DbRegexCond (   $FieldName,
  $pattern 
)

Build the condition string for the $FieldName using the pattern matching syntax public

Parameters
string
string
Returns
string

Definition at line 245 of file CYap_db.php.

OpenDB (   $Server,
  $User = "",
  $Password = "" 
)

Open the database connection

Parameters
string$serverdatabase server
string$Userusername
string$PasswordUser password public
Returns
bool true on success, false on failure

Definition at line 80 of file CYap_db.php.

QueryLimit (   $select,
  $start = 0,
  $many = -1 
)

Perform a select statement using range to limits the rows to return

Parameters
string$selectselect statement
integer$startno. rows to start
integer$manyhow many rows sholud be returned public
Returns
bool true on success, false on failure

Definition at line 104 of file CYap_db.php.

SelectDb (   $DBname)

Definition at line 83 of file CYap_db.php.

Field Documentation

$CurrentRow

Definition at line 58 of file CYap_db.php.

$Db_Open

Definition at line 46 of file CYap_db.php.

$DbConn

Definition at line 40 of file CYap_db.php.

$Dbresult

Definition at line 53 of file CYap_db.php.

$LastQuery

Definition at line 63 of file CYap_db.php.

$txtError

Definition at line 52 of file CYap_db.php.


The documentation for this class was generated from the following file: