phpDocumentor CYap
[ Back ] [ class tree: CYap ] [ index: CYap ] [ all elements ]

Class: CYapDB

Source Location: /CYap_db.php

Class CYapDB

Property Summary
array   $CurrentRow  
mixed   $DbConn  
mixed   $Dbresult  
boolean   $Db_Open   Connection to database already open
array   $LastQuery  
string   $txtError   Error descritpion from last command

[ Top ]
Method Summary
CYapDB   CYapDB()  
void   DbaddSql()   From an array of values, made the sql for adding the row
string   DbError()   Return the error descritpion from last command
string   DbEscape()   Escape the string using the db functions, if provided It don't apply the escape string if magic_quotes_gpc is enabled
bool   DbExecSql()   Execute the given query
object DbMeta   DbFetchField()   Get column information from a result and return as an object
string   DbFieldFlags()   Get the flags associated with the specified field in a result
bool   DbFreeResult()   Free the given result
integer   DbGetNumFields()   Retrieve the number of fields retrieved by the given result
integer   DbGetNumRow()   Retrieve the number of rows retrieved by the given result
void   DbmodifySql()   From an array of values, made the sql for modify the row
string   DbRegexCond()   Build the condition string for the $FieldName using the pattern matching
bool   OpenDB()   Open the database connection
bool   QueryLimit()   Perform a select statement using range to limits the
void   SelectDb()  

[ Top ]
Properties
array   $CurrentRow [line 58]
API Tags:
Access:  private


[ Top ]
mixed   $DbConn [line 40]

[ Top ]
mixed   $Dbresult [line 53]

[ Top ]
boolean   $Db_Open [line 46]

Connection to database already open

API Tags:
Access:  private


[ Top ]
array   $LastQuery [line 63]
API Tags:
Access:  private


[ Top ]
string   $txtError [line 52]

Error descritpion from last command

API Tags:
Access:  private


[ Top ]
Methods
Constructor CYapDB  [line 67]

  CYapDB CYapDB( )



[ Top ]
DbaddSql  [line 191]

  void DbaddSql( array $row, array $fieldsType, string $KeyField  )

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

Parameters:
array   $row:  array of values. The key is the field name
array   $fieldsType:  type of each fields
string   $KeyField:  name of the key field

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
DbError  [line 177]

  string DbError( )

Return the error descritpion from last command


API Tags:
Access:  public


[ Top ]
DbEscape  [line 163]

  string DbEscape( string $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   $value:  sql statement

API Tags:
Return:  the escaped string
Access:  public


Redefined in descendants as:
  • CYap_MsSQL::DbEscape() : Escape the string using the db functions, if provided It don't apply the escape string if magic_quotes_gpc is enabled
  • CYap_mysql::DbEscape() : Escape the string using the db functions, if provided It don't apply the escape string if magic_quotes_gpc is enabled Mysql version. It uses the mysql_escape string function instead of addslashes
  • CYap_odbc::DbEscape() : Escape the string using the db functions, if provided It don't apply the escape string if magic_quotes_gpc is enabled

[ Top ]
DbExecSql  [line 92]

  bool DbExecSql( string $sql  )

Execute the given query

Parameters:
string   $sql:  sql statement

API Tags:
Return:  true on success, false on failure
Access:  public


Redefined in descendants as:

[ Top ]
DbFetchField  [line 133]

  object DbMeta DbFetchField( integer $result, integer $FieldNo  )

Get column information from a result and return as an object

Parameters:
integer   $result: 
integer   $FieldNo: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
DbFieldFlags  [line 143]

  string DbFieldFlags( resource $result, integer $FieldNo  )

Get the flags associated with the specified field in a result

Parameters:
resource   $result: 
integer   $FieldNo: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
DbFreeResult  [line 152]

  bool DbFreeResult( integer $result  )

Free the given result

Parameters:
integer   $result: 

API Tags:
Return:  true on success, false on failure
Access:  public


Redefined in descendants as:

[ Top ]
DbGetNumFields  [line 122]

  integer DbGetNumFields( integer $result  )

Retrieve the number of fields retrieved by the given result

Parameters:
integer   $result: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
DbGetNumRow  [line 113]

  integer DbGetNumRow( integer $result  )

Retrieve the number of rows retrieved by the given result

Parameters:
integer   $result: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
DbmodifySql  [line 223]

  void DbmodifySql( array $row, array $fieldsType  )

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

Parameters:
array   $row:  array of values. The key is the field name
array   $fieldsType:  type of each fields

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
DbRegexCond  [line 245]

  string DbRegexCond( string $FieldName, string $pattern  )

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

syntax

Parameters:
string   $FieldName: 
string   $pattern: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
OpenDB  [line 80]

  bool OpenDB( mixed $Server, [string $User = ""], [string $Password = ""], string $server  )

Open the database connection

Parameters:
string   $server:  database server
string   $User:  username
string   $Password:  User password

API Tags:
Return:  true on success, false on failure
Access:  public


[ Top ]
QueryLimit  [line 104]

  bool QueryLimit( string $select, [integer $start = 0], [integer $many = -1]  )

Perform a select statement using range to limits the

rows to return

Parameters:
string   $select:  select statement
integer   $start:  no. rows to start
integer   $many:  how many rows sholud be returned

API Tags:
Return:  true on success, false on failure
Access:  public


Redefined in descendants as:

[ Top ]
SelectDb  [line 83]

  void SelectDb( mixed $DBname  )



Redefined in descendants as:

[ Top ]

Documentation generated on Sat, 26 Feb 2005 14:09:59 +0100 by phpDocumentor 1.3.0RC3