Mult-Rater Feedback
[ class tree: SQL ] [ index: SQL ] [ all elements ]

Class: SQL

Source Location: /shared/libs/sql.lib.php

Class Overview


SQL Class


Variables

Methods


Child classes:

MRF_SQL
Database Configuration

Class Details

[line 55]
SQL Class

The SQL Class is the meat of the SQL Layer Package, and is what we will be extending in all of our future applications.

We will not be using any static methods from this class, as it would defeat the purpose, and we could just as easily use PEAR::DB static methods.




[ Top ]


Class Variables

$db =  null

[line 57]



Tags:

access:  public

Type:   mixed


[ Top ]

$error =  null

[line 59]



Tags:

access:  public

Type:   mixed


[ Top ]

$record =  null

[line 60]



Tags:

access:  public

Type:   mixed


[ Top ]

$result =  null

[line 58]



Tags:

access:  public

Type:   mixed


[ Top ]



Class Methods


constructor SQL [line 67]

SQL SQL( )

class constructor

Currently Empty




[ Top ]

method connect [line 74]

void connect( string $dsn)

connect to the database



Parameters:

string   $dsn   the data source name

[ Top ]

method disconnect [line 87]

void disconnect( )

disconnect from the database



[ Top ]

method insert [line 158]

true|false insert( string $table, array $fields)

Insert Data into the Database

Wrapper for PEAR DB::autoExecute




Parameters:

string   $table   Table to insert into
array   $fields   Data to insert into table

[ Top ]

method next [line 137]

void next( [string $format = SQL_INDEX])

connect to the database



Parameters:

string   $format   the query format

[ Top ]

method query [line 98]

void query( string $query, [string $type = SQL_NONE], [string $format = SQL_INDEX])

query the database



Parameters:

string   $query   the SQL query
string   $type   the type of query
string   $format   the query format

[ Top ]

method update [line 188]

true|false update( string $table, array $fields, string $where)

Update Data in the Database

Wrapper for PEAR DB::autoExecute() Contrary to DB::autoExecute(), insert() will require a WHERE statement, thus making it even harder to mess up an entire table with a single update statement.




Parameters:

string   $table   Table to update
array   $fields   Data to update in table
string   $where   Where clause for Update

[ Top ]


Documentation generated on Fri, 27 Jan 2006 16:25:37 -0700 by phpDocumentor 1.3.0RC3