Pluf_SQL Class Reference

List of all members.

Public Member Functions

 __construct ($base='', $args=array())
 gen ()
 Q ($base, $args=array())
 SAnd ($sql)
 SOr ($sql)
 SDef ($sql, $k='AND')
 keywords ($string, $del=' ')

Public Attributes

 $ands = array()

Protected Attributes

 $db
 $where = ''


Detailed Description

Generate the WHERE SQL clause in an easy and SQL proof way.

Constructor & Destructor Documentation

Pluf_SQL::__construct ( base = '',
args = array() 
)

Construct the constructor with a default condition.


Member Function Documentation

Pluf_SQL::gen (  ) 

Returns the where clause.

Returns:
string Where clause without the WHERE

Pluf_SQL::Q ( base,
args = array() 
)

Add a condition.

Parameters:
string String to 'interpolate'
mixed String or array of parameters (array())

Pluf_SQL::SAnd ( sql  ) 

Add another SQL as a AND.

Parameters:
Pluf_SQL Other object to add to the current.

Pluf_SQL::SOr ( sql  ) 

Add another SQL as a OR

Parameters:
Pluf_SQL Other object to add to the current.

Pluf_SQL::SDef ( sql,
k = 'AND' 
)

Add another SQL to the current

Parameters:
Pluf_SQL Other object to add to the current.
string Type of addition

Pluf_SQL::keywords ( string,
del = ' ' 
)

Get keywords.

Considering a query string, explode the query string in keywords given a defined delimiter.

Parameters:
string Query string
string delimiter (' ')
Returns:
array Array of keywords


Member Data Documentation

Pluf_SQL::$db [protected]

Pluf_SQL::$where = '' [protected]

Pluf_SQL::$ands = array()


The documentation for this class was generated from the following file:

Generated on Wed Feb 3 15:44:52 2010 for Pluf by  doxygen