PHP Classes


Recommend this page to a friend!
  Classes of Erik Giberti  >  sqltoolkit  >  DOCUMENTATION  >  Download  
Role: Documentation
Content type: text/plain
Description: Documentation
Class: sqltoolkit
An API for interfacing with databases
Author: By
Last change:
Date: 13 years ago
Size: 4,511 bytes


Class file image Download
PHP SQL Toolkit Documentation

The most current information regarding PHP SQL Toolkit can be found at including downloads, past versions, 
support and general information regarding this toolkit.

ΚΚ bool database_close( database_connection ) 
Closes an open database_connection created with database_connect(). Returns TRUE on success, FALSE on failure. See also database_quick_query() 

ΚΚ database_connection database_connect( datasource ) 
Establishes a connection to the specified datasource and returns a database_connection class for working with the connection. 

ΚΚ bool database_data_seek( database_result, int ) 
Seeks the specified int row value within the specified result set. If this is followed by database_fetch_row(), database_fetch_object() or database_fetch_assoc() that row will be returned. This will return TRUE if the function was able to set that row as next, FALSE if it was unable to. Common causes of a FALSE are trying to reference a row that doesn't exist. 

ΚΚ array database_fetch_assoc( database_result ) 
Returns an associative array with the information from the next row in the database_result passed in. Sample access to this information would be in the format of array["fieldname"]. 

ΚΚ array database_fetch_data( database_result ) 
Returns a 2 dimentional array with the data as it is stored within the database_result class passed into the function. This should not be used in production code and is only provided for debugging purposes. 

ΚΚ array database_fetch_info( database_result ) 
Returns an array of internal information regarding current position of the database_result passed in, such as current row, max rows and number of fields. 

ΚΚ object database_fetch_object( database_result ) 
Returns an object with the field names as values. Sample access to this information would be row->fieldname. 

ΚΚ array database_fetch_row( database_result ) 
Returns an enumerated array with the information from the next row in the database_result passed in. Sample access to this information would be in the format array[0]. 

ΚΚ bool database_free_result( database_result ) 
Attempts to free the memory associated with the database_result provided. Always returns TRUE. 

ΚΚ database_result database_import_xml_packet( string ) 
Takes an xml packet for input and parses it into a database_result object for use with standard row fetching methods like database_fetch_assoc(), database_fetch_object() and database_fetch_row(). 

ΚΚ database_result database_import_xml_url( string ) 
Takes a URL string to perform an HTTP GET on and pulls the resulting XML packet into a database_result object. This is just a wrapper for the XML packet function. See also database_import_xml_packet(). 

ΚΚ int database_num_fields( database_result ) 
Returns the number of fields contained in each row of the provided database_result 

ΚΚ int database_num_rows( database_result ) 
Returns the number of rows in the provided database_result. 

ΚΚ database_result database_query( database_connection, string ) 
Returns a database neutral dataset in a class defined in database_result.php. This acts on a database connection established with database_connect() the query should be written as close to SQL99 Standards as possible to avoid vendor specific issues later. See also database_quick_query() 

ΚΚ database_result database_quick_query( datasource, string ) 
Executes the provided string against the provided datasource and returns a database_result. The function handles all the database connection calls to quickly pull together a set of information. See also database_conect(), database_query() and database_close() 

ΚΚ void database_result_dump( database_result ) 
Prints an HTML representation of the database_result passed in. See the sample page for a demo. 

ΚΚ string database_result_xml( database_result ) 
Converts a database_result into a standardized xml packet for export to other systems, disk writes etc.