A_Sql
[ class tree: A_Sql ] [ index: A_Sql ] [ all elements ]

Class: A_Sql_Select

Source Location: /Sql/Select.php

Class Overview

A_Sql_Statement
   |
   --A_Sql_Select

A_Sql_Select


Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 15]
A_Sql_Select

Generate SQL SELECT statement




[ Top ]


Class Variables

$limit =  null

[line 45]

Limit A_Sql_Limit



Tags:

access:  protected

Type:   object


[ Top ]

$pieces = array(
      'tables' => null,
      'columns' => null,
      'joins' => null,
      'where' => null,
      'having' => null,
      'orderby' => null,
      'groupby' => null,
   )

[line 30]

Select statement pieces



Tags:

access:  protected

Type:   array


[ Top ]

$replace = array()

[line 23]

Rendered SQL pieces



Tags:

access:  protected

Type:   array


[ Top ]



Class Methods


method columns [line 53]

$this columns( )

Set select statement columns



Tags:

access:  public


[ Top ]

method crossJoin [line 193]

$this crossJoin( string $table1, string $table2)

Set select statement CROSS JOIN clause



Tags:

access:  public


Parameters:

string   $table1  
string   $table2  

[ Top ]

method from [line 79]

$this from( mixed $table_name)

Set select statement FROM clause



Tags:

access:  public


Parameters:

mixed   $table_name   OR $table_array OR $from_object

[ Top ]

method fullJoin [line 205]

$this fullJoin( string $table1, string $table2)

Set select statement FULL JOIN clause



Tags:

access:  public


Parameters:

string   $table1  
string   $table2  

[ Top ]

method getColumns [line 64]

int getColumns( )

Get number of columns



Tags:

access:  public


[ Top ]

method groupBy [line 283]

self groupBy( unknown_type $columns)

Set select statement GROUP BY clause



Tags:

access:  public


Parameters:

unknown_type   $columns  

[ Top ]

method having [line 249]

$this having( unknown_type $arg1, [unknown_type $arg2 = null], [unknown_type $arg3 = null])

Set select statement HAVING clause

Succesive having invocations are added by AND




Tags:

todo:  Please elaborate on the arguments
access:  public


Parameters:

unknown_type   $arg1  
unknown_type   $arg2  
unknown_type   $arg3  

[ Top ]

method innerJoin [line 158]

$this innerJoin( string $table1, string $table2)

Set select statement INNER JOIN clause



Tags:

access:  public


Parameters:

string   $table1  
string   $table2  

[ Top ]

method join [line 142]

$this join( string $table1, string $table2, [string $type = 'INNER'])

Set select statement JOIN clause with overidable join type parameter



Tags:

access:  public


Parameters:

string   $table1  
string   $table2  
string   $type  

[ Top ]

method leftJoin [line 170]

$this leftJoin( string $table1, string $table2)

Set select statement INNER JOIN clause



Tags:

access:  public


Parameters:

string   $table1  
string   $table2  

[ Top ]

method limit [line 309]

$this limit( [int $count = null], [int $offset = null])

Sets a limit count and offset



Tags:

access:  public


Parameters:

int   $count  
int   $offset  

[ Top ]

method limitPage [line 323]

$this limitPage( int $page, int $rowCount)

Sets the limit and count by page number



Tags:

access:  public


Parameters:

int   $page   Page number
int   $rowCount   Rows per page

[ Top ]

method naturalJoin [line 217]

$this naturalJoin( string $table1, string $table2)

Set select statement NATURAL JOIN clause



Tags:

access:  public


Parameters:

string   $table1  
string   $table2  

[ Top ]

method on [line 229]

$this on( mixed $arg1, [ $arg2 = null], [ $arg3 = null])

Set select statement JOIN clause



Tags:

access:  public


Parameters:

mixed   $arg1  
   $arg2  
   $arg3  

[ Top ]

method orderBy [line 296]

$this orderBy( unknown_type $columns)

Set select statement ORDER BY clause



Tags:

todo:  Same as before
access:  public


Parameters:

unknown_type   $columns  

[ Top ]

method orHaving [line 267]

$this orHaving( unknown_type $data, [unknown_type $value = null])

Set select statement HAVING clause by OR



Tags:

todo:  Please elaborate on the arguments
access:  public


Parameters:

unknown_type   $data  
unknown_type   $value  

[ Top ]

method orWhere [line 124]

$this orWhere( mixed $data, [string $value = null])

Set select statement WHERE clause by OR



Tags:

todo:  elaborate on the argumetns?
access:  public


Parameters:

mixed   $data  
string   $value  

[ Top ]

method render [line 345]

string render( )

Render SQL statement from parts



Tags:

access:  public


[ Top ]

method reset [line 381]

$this reset( string $part)

Clear the SQL statement parts



Tags:

access:  public


Parameters:

string   $part   OPTIONAL

[ Top ]

method rightJoin [line 181]

$this rightJoin( string $table1, string $table2)

Set select statement RIGHT JOIN clause



Tags:

access:  public


Parameters:

string   $table1  
string   $table2  

[ Top ]

method where [line 101]

$this where( [mixed $arg1 = null], [mixed $arg2 = null], [mixed $arg3 = null])

Set select statement WHERE clause

Succesive where invocations are added by AND




Tags:

see:  A_Sql_Where for argument description (But you won't find anything...)
access:  public


Parameters:

mixed   $arg1  
mixed   $arg2  
mixed   $arg3  

[ Top ]

method __toString [line 336]

string __toString( )

Convert object to string, invokes render()



Tags:

access:  public


[ Top ]


Documentation generated on Sun, 24 Jul 2011 00:03:37 +0000 by phpDocumentor 1.4.3