phpDocumentor GloryLands
Database
[ class tree: GloryLands ] [ index: GloryLands ] [ all elements ]

Class: mysql_jet

Source Location: /engine/lib/db/jet/db.mysql.php

Class mysql_jet

Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From DBJet

DBJet::check_select()
Check if the select query will return data
DBJet::delete()
Delete a data row from the database
DBJet::empty_results()
Check if the resultset is empty
DBJet::fetch_array()
Fetch a row from the resultset
DBJet::fetch_array_all()
Fetch all the rows of the resultset
DBJet::fetch_array_all_ex()
Fetch all the rows from the resultset using an extended field
DBJet::fetch_array_ex()
Fetch a row from the resultset using an extended field
DBJet::fetch_value()
Fetch a single value from the resultset
DBJet::get_error_message()
Get the last error message
DBJet::get_tables()
Get the names of all the tables in the database
DBJet::get_table_structure()
Get a table structure
DBJet::init()
Initialize Database jet, using the configuration provided
DBJet::insert()
Insert a new data row on the database
DBJet::num_changed()
Get the number of changed rows in the resultset
DBJet::num_pages()
Get the total ammount of pages that are used by the pager
DBJet::num_rows()
Get the number of rows in the resultset
DBJet::paging_fetch_array()
Fetch a row from the resultset, using the paging mechanism
DBJet::paging_fetch_array_ex()
Fetch all the rows of the resultset, using the paging mechanism
DBJet::paging_start()
Start the automated data pager The paging system allows you to group the results into pages, quickly and efficiently.
DBJet::query()
Manually execute a complex SQL query
DBJet::query_and_get()
Perform an SQ query and return the first row
DBJet::replace()
Replace a data row into the database
DBJet::select()
Select a row from the database
DBJet::select_and_get()
Select data and fetch the first row
DBJet::set_row()
Set the current resultset pointer into a different row
DBJet::update()
Update a row on the database

[ Top ]
Property Summary
int   $affectedRows   Last query's affected rows
resource   $conID   Connection ID Definition
bool   $emptyResults   Last query didn't return any results
string   $errPosition   Description of current action in case of error
resource   $lastResult   Last query's results
int   $numRows   Last query's number of rows
int   $queryList   If we have global debug enabled, this function will store the
int   $totQueries   The number of queries performed
float   $totTime   The total time spent on queries

[ Top ]
Method Summary
bool|resource   delete()   Remove one or more rows from a table.
bool|resource   fetch_array()   Return a row from the last queried resultset
bool|resource   fetch_array_all()   Return all the rows from the last queried resultset
bool|resource   fetch_value()   Return the first value of the first row of the requested query, using a specified resultset
void   free_query()   Release a specific query resultset
void   free_results()   Release the last queried resultset
string   getQueries()   Visualize the queries being executed for debug purposes
string   get_error_message()   Returns detailed information for the last error occured
bool|array   get_tables()   List the database tables
bool|array   get_table_structure()   Show the database structure
void   init()   Initializes MySQL Class
bool|resource   insert()   Insert a new row on specified table
void   num_changed()  
void   num_rows()  
bool   poll()   Performs a query and returns true if the results are not empty
bool|resource   query()   Performs a query
bool|string   query_and_get_value()   Performs a query and returns the first value of the first row or false in case of error
bool|resource   replace()   Replace or insert a new row on specified table
bool   run()   Execute a SQL script
bool|resource   select()   Select one or more rows from a table.
void   set_row()   Moves the internal row pointer to a new position
string   SQLTime()   Converts a UNIX timestamp into SQL timestamp
int   UNIXTime()   Converts a UNIX timestamp into SQL timestamp
bool|resource   update()   Update a row on a table.

[ Top ]
Properties
int   $affectedRows [line 65]

Last query's affected rows

Last query's affected rows


[ Top ]
resource   $conID [line 47]

Connection ID Definition

Connection ID Definition


[ Top ]
bool   $emptyResults [line 85]

Last query didn't return any results

Last query didn't return any results


[ Top ]
string   $errPosition [line 53]

Description of current action in case of error

Description of current action in case of error


[ Top ]
resource   $lastResult [line 59]

Last query's results

Last query's results


[ Top ]
int   $numRows [line 72]

Last query's number of rows

Last query's number of rows


[ Top ]
int   $queryList [line 104]

If we have global debug enabled, this function will store the

If we have global debug enabled, this function will store the queries being executed


[ Top ]
int   $totQueries [line 91]

The number of queries performed

The number of queries performed


[ Top ]
float   $totTime [line 97]

The total time spent on queries

The total time spent on queries


[ Top ]
Methods
delete  [line 396]

  bool|resource delete( string $table, [ $index_data = false], string $where  )

Remove one or more rows from a table.

Remove one or more rows from a table.

Parameters:
string   $table:  The table name from which to edit the data
string   $where:  A MySQL WHERE-formatted query part or an array containing the indexing values
   $index_data: 

API Tags:
Return:  Returns false in case of error or the resultset of the executed query


Redefinition of:
DBJet::delete()
Delete a data row from the database

[ Top ]
fetch_array  [line 214]

  bool|resource fetch_array( [int $resmode = MYSQL_BOTH], [ $resultset = false]  )

Return a row from the last queried resultset

Return a row from the last queried resultset

Parameters:
int   $resmode:  The type of array that is to be fetched. It's a constant and can take the following values: MYSQL_ASSOC, MYSQL_NUM, and the default value of MYSQL_BOTH
   $resultset: 

API Tags:
Return:  Returns the row or false in case of error or end of results


Redefinition of:
DBJet::fetch_array()
Fetch a row from the resultset

[ Top ]
fetch_array_all  [line 226]

  bool|resource fetch_array_all( [int $resmode = MYSQL_BOTH], [ $resultset = false]  )

Return all the rows from the last queried resultset

Return all the rows from the last queried resultset

Parameters:
int   $resmode:  The type of array that is to be fetched. It's a constant and can take the following values: MYSQL_ASSOC, MYSQL_NUM, and the default value of MYSQL_BOTH
   $resultset: 

API Tags:
Return:  Returns the row or false in case of error or end of results


Redefinition of:
DBJet::fetch_array_all()
Fetch all the rows of the resultset

[ Top ]
fetch_value  [line 190]

  bool|resource fetch_value( [resource $result = false]  )

Return the first value of the first row of the requested query, using a specified resultset

Return the first value of the first row of the requested query, using a specified resultset

Parameters:
resource   $result:  (optional) Resultset obdained from a query() or query-like function

API Tags:
Return:  Returns the value or false in case of error


Redefinition of:
DBJet::fetch_value()
Fetch a single value from the resultset

[ Top ]
free_query  [line 204]

  void free_query( resource $resultset  )

Release a specific query resultset

Release a specific query resultset

Parameters:
resource   $resultset:  Resultset obdained from query() function


[ Top ]
free_results  [line 240]

  void free_results( )

Release the last queried resultset

Release the last queried resultset



[ Top ]
getQueries  [line 584]

  string getQueries( )

Visualize the queries being executed for debug purposes

Visualize the queries being executed for debug purposes


API Tags:
Return:  Returns an HTML formatted result with the queries and their status


[ Top ]
get_error_message  [line 262]

  string get_error_message( [bool $formatted = true]  )

Returns detailed information for the last error occured

Returns detailed information for the last error occured

Parameters:
bool   $formatted:  (optional) TRUE If you want the result to be a pre-formatted HTML response

API Tags:
Return:  An HTML-Formatted error description


Redefinition of:
DBJet::get_error_message()
Get the last error message

[ Top ]
get_tables  [line 475]

  bool|array get_tables( )

List the database tables

List the database tables


API Tags:
Return:  Returns false in case of error or the tables as array


Redefinition of:
DBJet::get_tables()
Get the names of all the tables in the database

[ Top ]
get_table_structure  [line 496]

  bool|array get_table_structure( string $table  )

Show the database structure

Show the database structure

Parameters:
string   $table:  The table name

API Tags:
Return:  Returns false in case of error or the table columns as associative array (Key = column name)


Redefinition of:
DBJet::get_table_structure()
Get a table structure

[ Top ]
init  [line 116]

  void init( $config, string $vdb, string $vhost, string $vuser, string $vpwd, bool $presistent  )

Initializes MySQL Class

Initializes MySQL Class

Parameters:
string   $vdb:  Database name
string   $vhost:  Database server host
string   $vuser:  Login user name
string   $vpwd:  Login user password
bool   $presistent:  Make a presitent connection with the server
   $config: 


Redefinition of:
DBJet::init()
Initialize Database jet, using the configuration provided

[ Top ]
insert  [line 277]

  bool|resource insert( string $table, array $data  )

Insert a new row on specified table

Insert a new row on specified table

Parameters:
string   $table:  The table name to add the data
array   $data:  An one-dimensional array that contains the field names (as keys) and the field values to add

API Tags:
Return:  Returns false in case of error or the resultset of the executed query


Redefinition of:
DBJet::insert()
Insert a new data row on the database

[ Top ]
num_changed  [line 66]

  void num_changed( )



Redefinition of:
DBJet::num_changed()
Get the number of changed rows in the resultset

[ Top ]
num_rows  [line 73]

  void num_rows( [ $resultset = false]  )

Parameters:
   $resultset: 


Redefinition of:
DBJet::num_rows()
Get the number of rows in the resultset

[ Top ]
poll  [line 316]

  bool poll( string $query  )

Performs a query and returns true if the results are not empty

Performs a query and returns true if the results are not empty

Parameters:
string   $query:  The query to execute

API Tags:
Return:  Returns false in case of error or empty resultset, or true otherways


[ Top ]
query  [line 158]

  bool|resource query( string $text  )

Performs a query

Performs a query

Parameters:
string   $text:  Query text to execute

API Tags:
Return:  Returns the query resultset or false in case of error


Redefinition of:
DBJet::query()
Manually execute a complex SQL query

[ Top ]
query_and_get_value  [line 341]

  bool|string query_and_get_value( string $query  )

Performs a query and returns the first value of the first row or false in case of error

Performs a query and returns the first value of the first row or false in case of error

Parameters:
string   $query:  The query to execute

API Tags:
Return:  Returns false in case of error or the first row's first field value


[ Top ]
replace  [line 297]

  bool|resource replace( string $table, array $data  )

Replace or insert a new row on specified table

Replace or insert a new row on specified table

Parameters:
string   $table:  The table name to add the data
array   $data:  An one-dimensional array that contains the field names (as keys) and the field values to add

API Tags:
Return:  Returns false in case of error or the resultset of the executed query


Redefinition of:
DBJet::replace()
Replace a data row into the database

[ Top ]
run  [line 544]

  bool run( string $file  )

Execute a SQL script

Execute a SQL script

Parameters:
string   $file:  The filename to load and run

API Tags:
Return:  Returns true if all the queries were successfull or false if one query failed


[ Top ]
select  [line 426]

  bool|resource select( string $table, [string $index_data = false], [string $return_data = false], [ $order_by = false], [ $sort_order = false]  )

Select one or more rows from a table.

Select one or more rows from a table.

Parameters:
string   $table:  The table name from which to edit the data
string   $index_data:  A MySQL WHERE-formatted query part or an array containing the indexing values
string   $return_data:  A MySQL SELECT-formatted query part or an array containing the values to return
   $order_by: 
   $sort_order: 

API Tags:
Return:  Returns false in case of error or the resultset of the executed query


Redefinition of:
DBJet::select()
Select a row from the database

[ Top ]
set_row  [line 250]

  void set_row( int $row, [ $resultset = false]  )

Moves the internal row pointer to a new position

Moves the internal row pointer to a new position

Parameters:
int   $row:  The row index to jump to
   $resultset: 


Redefinition of:
DBJet::set_row()
Set the current resultset pointer into a different row

[ Top ]
SQLTime  [line 518]

  string SQLTime( int $timestamp  )

Converts a UNIX timestamp into SQL timestamp

Converts a UNIX timestamp into SQL timestamp

Parameters:
int   $timestamp:  A UNIX timestamp value

API Tags:
Return:  Returns the value into MySQL timestamp format


[ Top ]
UNIXTime  [line 528]

  int UNIXTime( string $timestamp  )

Converts a UNIX timestamp into SQL timestamp

Converts a UNIX timestamp into SQL timestamp

Parameters:
string   $timestamp:  A MySQL timestamp value

API Tags:
Return:  Returns the value into UNIX timestamp format


[ Top ]
update  [line 369]

  bool|resource update( string $table, $index_data, $insert_data, string $where, array $data  )

Update a row on a table.

Update a row on a table. The row to edit is defined by a where clause

Parameters:
string   $table:  The table name from which to edit the data
string   $where:  A MySQL WHERE-formatted query part. This is used to identify the item(s) to edit (ex. "`index` = 2")
array   $data:  An one-dimensional array that contains the field names (as keys) and the field values to edit
   $index_data: 
   $insert_data: 

API Tags:
Return:  Returns false in case of error or the resultset of the executed query


Redefinition of:
DBJet::update()
Update a row on the database

[ Top ]

Documentation generated on Tue, 13 Oct 2009 23:48:47 +0300 by phpDocumentor 1.4.1