phpDocumentor pond
[ class tree: pond ] [ index: pond ] [ all elements ]

Class: SQL

Source Location: /qp_inc/_core/model/db/_sql.class.php

Class SQL

Descendants
Child Class Description
ItemQuery ItemQuery: help constructing queries on Items

[ Top ]
Property Summary
mixed   $from  
mixed   $group_by  
mixed   $limit  
mixed   $order_by  
mixed   $search_field  
mixed   $search_field_regexp  
mixed   $select  
mixed   $where  

[ Top ]
Method Summary
SQL   SQL()   Constructor.
void   add_search_field()   create array of search fields
void   display()   Get whole query
void   FROM()  
void   FROM_add()   Extends the FROM clause.
void   get()   Get whole query
void   get_from()   Get FROM clause if there is something inside
void   get_group_by()   Get GROUP BY clause if there is something inside
void   get_limit()   Get LIMIT clause if there is something inside
void   get_order_by()   Get ORDER BY clause if there is something inside
void   get_select()   Get SELECT clause if there is something inside
void   get_where()   Get WHERE clause if there is something inside
void   GROUP_BY()   dummy docblock makes error-free autodocs
void   LIMIT()   dummy docblock makes error-free autodocs
void   ORDER_BY()   dummy docblock makes error-free autodocs
void   ORDER_BY_prepend()   dummy docblock makes error-free autodocs
void   SELECT()   Set SELECT clause
void   SELECT_add()   Extends the SELECT clause.
void   WHERE()  
void   WHERE_and()   Extends the WHERE clause with AND
void   WHERE_keyword()   create the filter whith the search field array
void   WHERE_or()   Extends the WHERE clause with OR
void   WHERE_regexp()   create the filter whith the search field regexp array

[ Top ]
Properties
mixed   $from = '' [line 41]

[ Top ]
mixed   $group_by = '' [line 43]

[ Top ]
mixed   $limit = '' [line 45]

[ Top ]
mixed   $order_by = '' [line 44]

[ Top ]
mixed   $search_field = array() [line 46]

[ Top ]
mixed   $search_field_regexp = array() [line 47]

[ Top ]
mixed   $select = '' [line 40]

[ Top ]
mixed   $where = '' [line 42]

[ Top ]
Methods
Constructor SQL  [line 53]

  SQL SQL( )

Constructor.



[ Top ]
add_search_field  [line 316]

  void add_search_field( string $field, [string $reg_exp = '']  )

create array of search fields

Parameters:
string   $field:  field to search on
string   $reg_exp:  regular expression we want to use on the search for the field param


[ Top ]
display  [line 77]

  void display( )

Get whole query



[ Top ]
FROM  [line 197]

  void FROM( $from  )

Parameters:
   $from: 


[ Top ]
FROM_add  [line 207]

  void FROM_add( string $from_add  )

Extends the FROM clause.

Parameters:
string   $from_add:  should typically start with INNER JOIN or LEFT JOIN


[ Top ]
get  [line 61]

  void get( )

Get whole query



[ Top ]
get_from  [line 105]

  void get_from( [ $prefix = ' FROM ']  )

Get FROM clause if there is something inside

Parameters:
   $prefix: 


[ Top ]
get_group_by  [line 133]

  void get_group_by( [ $prefix = ' GROUP BY ']  )

Get GROUP BY clause if there is something inside

Parameters:
   $prefix: 


[ Top ]
get_limit  [line 161]

  void get_limit( [ $prefix = ' LIMIT ']  )

Get LIMIT clause if there is something inside

Parameters:
   $prefix: 


[ Top ]
get_order_by  [line 147]

  void get_order_by( [ $prefix = ' ORDER BY ']  )

Get ORDER BY clause if there is something inside

Parameters:
   $prefix: 


[ Top ]
get_select  [line 91]

  void get_select( [ $prefix = ' SELECT ']  )

Get SELECT clause if there is something inside

Parameters:
   $prefix: 


[ Top ]
get_where  [line 119]

  void get_where( [ $prefix = ' WHERE ']  )

Get WHERE clause if there is something inside

Parameters:
   $prefix: 


[ Top ]
GROUP_BY  [line 269]

  void GROUP_BY( $group_by  )

dummy docblock makes error-free autodocs

Parameters:
   $group_by: 


[ Top ]
LIMIT  [line 305]

  void LIMIT( $limit  )

dummy docblock makes error-free autodocs

Parameters:
   $limit: 


[ Top ]
ORDER_BY  [line 277]

  void ORDER_BY( $order_by  )

dummy docblock makes error-free autodocs

Parameters:
   $order_by: 


[ Top ]
ORDER_BY_prepend  [line 285]

  void ORDER_BY_prepend( $order_by_prepend  )

dummy docblock makes error-free autodocs

Parameters:
   $order_by_prepend: 


[ Top ]
SELECT  [line 175]

  void SELECT( $select  )

Set SELECT clause

Parameters:
   $select: 


[ Top ]
SELECT_add  [line 186]

  void SELECT_add( srting $select_add  )

Extends the SELECT clause.

Parameters:
srting   $select_add:  should typically start with a comma ','


[ Top ]
WHERE  [line 218]

  void WHERE( $where  )

Parameters:
   $where: 


[ Top ]
WHERE_and  [line 227]

  void WHERE_and( string $where_and  )

Extends the WHERE clause with AND

Parameters:
string   $where_and: 


[ Top ]
WHERE_keyword  [line 331]

  void WHERE_keyword( string $search, string $search_kw_combine  )

create the filter whith the search field array

Parameters:
string   $search:  search
string   $search_kw_combine:  operator( AND , OR , PHRASE ) for the filter


[ Top ]
WHERE_or  [line 250]

  void WHERE_or( string $where_or  )

Extends the WHERE clause with OR

NOTE: there is almost NEVER a good reason to use this! Think again!

Parameters:
string   $where_or: 


[ Top ]
WHERE_regexp  [line 386]

  void WHERE_regexp( string $search, string $search_kw_combine  )

create the filter whith the search field regexp array

Parameters:
string   $search:  search
string   $search_kw_combine:  operator( AND , OR , PHRASE ) for the filter


[ Top ]