Login   Register  
PHP Classes
elePHPant
Icontem

File: README

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Kevin Cadman  >  Data Workings  >  README  >  Download  
File: README
Role: Documentation
Content type: text/plain
Description: Information
Class: Data Workings
Access database table records as objects
Author: By
Last change: Name change.
Date: 8 years ago
Size: 1,698 bytes
 

Contents

Class file image Download
DataWorkings by Kevin Cadman. (kevin.cadman@gmail.com)

Last Updated - 22/05/2006.

A class used to interface with an SQL database. Variables within the class are mapped according to the result set returned. Functions such as insert(),update() and delete() are supported.

Features: automatic primary-key detection, advanced error-checking on queries, automatic pagination, multiple DB support (mySQL recommended) and table joins.

In short, one of the simplest database systems you'll ever find!

NOTE: This class relies upon PEAR's DB class. You will need a working DB connection setup via PEAR's DB class to use this class.

Valid functions:

setEscapeHTML() - Used if we want to escape HTML characters when returning our results.
setPageVarName() - Used if we want to change the 'paging' variable (defaultly DWp)
setResultsPerPage() - Sets number of results per page
getNumRows() - returns number of affected rows
setJoin() - used to join tables
pagingHTML() - outputs HTML for pagination
setOrder() - used to set ordering on tables
setClause() - used to set 'where' clauses in queries.
get() - a 'quick' method of retrieving results via the automatically-detected primary key
query() - used in conjunction with setClause() and fetch() to get results based on clauses.
fetch() - fetches the results from the array and converts them to active variables within the class
update() - generates and performs the update query on the table
delete() - generates and performs the delete query on the table
insert() - generates and performs the insert query on the table

I hope you find this class useful. I am avaiable on email for any questions, suggestions or complaints.