b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (Version 1.8) [ class tree: evocore ] [ index: evocore ] [ all elements ]

Class: SQL

Source Location: /blogs/inc/_misc/_sql.class.php

Class SQL

Direct descendents
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()  
void   LIMIT()  
void   ORDER_BY()  
void   ORDER_BY_prepend()  
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 40]

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

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

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

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

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

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

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

[ Top ]
Methods
Constructor SQL  [line 52]

  SQL SQL( )

Constructor.



[ Top ]
add_search_field  [line 303]

  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 76]

  void display( )

Get whole query



[ Top ]
FROM  [line 196]

  void FROM( $from  )

Parameters:
   $from: 


[ Top ]
FROM_add  [line 206]

  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 60]

  void get( )

Get whole query



[ Top ]
get_from  [line 104]

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

Get FROM clause if there is something inside

Parameters:
   $prefix: 


[ Top ]
get_group_by  [line 132]

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

Get GROUP BY clause if there is something inside

Parameters:
   $prefix: 


[ Top ]
get_limit  [line 160]

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

Get LIMIT clause if there is something inside

Parameters:
   $prefix: 


[ Top ]
get_order_by  [line 146]

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

Get ORDER BY clause if there is something inside

Parameters:
   $prefix: 


[ Top ]
get_select  [line 90]

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

Get SELECT clause if there is something inside

Parameters:
   $prefix: 


[ Top ]
get_where  [line 118]

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

Get WHERE clause if there is something inside

Parameters:
   $prefix: 


[ Top ]
GROUP_BY  [line 265]

  void GROUP_BY( $group_by  )

Parameters:
   $group_by: 


[ Top ]
LIMIT  [line 292]

  void LIMIT( $limit  )

Parameters:
   $limit: 


[ Top ]
ORDER_BY  [line 270]

  void ORDER_BY( $order_by  )

Parameters:
   $order_by: 


[ Top ]
ORDER_BY_prepend  [line 275]

  void ORDER_BY_prepend( $order_by_prepend  )

Parameters:
   $order_by_prepend: 


[ Top ]
SELECT  [line 174]

  void SELECT( $select  )

Set SELECT clause

Parameters:
   $select: 


[ Top ]
SELECT_add  [line 185]

  void SELECT_add( srting $select_add  )

Extends the SELECT clause.

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


[ Top ]
WHERE  [line 217]

  void WHERE( $where  )

Parameters:
   $where: 


[ Top ]
WHERE_and  [line 226]

  void WHERE_and( string $where_and  )

Extends the WHERE clause with AND

Parameters:
string   $where_and: 


[ Top ]
WHERE_keyword  [line 318]

  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 249]

  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 373]

  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 ]

Documentation generated on Tue, 18 Dec 2007 23:22:52 +0100 by phpDocumentor 1.4.0