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

Class: Query

Source Location: /myphp-1.9/myphp-1.9-db/html/query/Query.php

Class Query

Class Overview

The Query object, which will supply all the sql

  1. Usage:
  2. $query = new Query();
  3. print $query->get($table,$id,$sid,$translate,$orderby,$sorted='',
  4. $skip='',$show='',$groupby='',$having='');
  5. Or
  6. $query = Query::get($table,$id,$sid,$translate,$orderby,$sorted='',
  7. $skip='',$show='',$groupby='',$having='');
  8. Or
  9. $text = Query::translate($sql);

Located in /myphp-1.9/myphp-1.9-db/html/query/Query.php [line 34]



		
		
		
		

Methods

[ Top ]
Direct descendents
Child Class Description
QueryBasket The Query object, which will supply all the sql for the Basket
QueryCustomer The Query object, which will supply all the sql for the Customer
QueryFormmail The Query object, which will supply all the sql for the Form Mail
QueryHistory The Query object, which will supply all the sql for the History
QueryLogin The Query object, which will supply all the sql for the Login

[ Top ]
Method Summary
Query   Query()   Constructor
String   from()   Return the FROM part of the query
String   get()   Return the query specified
String   groupby()   Return the GROUP BY part of the query
String   having()   Return the HAVING part of the query
String   limit()   Return the LIMIT [$skip,] $show The Limit part of the query
String   orderby()   Return the ORDER BY part of the query
String   select()   Return the SELECT part of the query
String   translate()   Return the translated SQL to language specific
String   where()   Return the WHERE part of the query

[ Top ]
Methods
Constructor Query  [line 38]

  Query Query( )

Constructor



[ Top ]
from  [line 88]

  String from( String $table  )

Return the FROM part of the query

Parameters:
String   $table:  The table to use

API Tags:
Return:  The requested query
Static:  


[ Top ]
get  [line 203]

  String get( String $table, [String $id = ''], [String $sid = ''], [boolean $translate = true], [String $orderby = ''], [String $sorted = ''], [String $skip = ''], [String $show = ''], [String $groupby = ''], [String $having = '']  )

Return the query specified

Parameters:
String   $table:  The table to use
String   $id:  The primary key to use
String   $sid:  The foreign key to use
boolean   $translate:  The query is translated to language (true)
String   $orderby:  The Order By to use
String   $sorted:  The sorted asc/desc (together with order by)
String   $skip:  The skip number of lines
String   $show:  The number to show
String   $groupby:  The group by
String   $having:  The having (together with group by)

API Tags:
Return:  The requested query
Static:  


Redefined in descendants as:

[ Top ]
groupby  [line 145]

  String groupby( [String $groupby = '']  )

Return the GROUP BY part of the query

Parameters:
String   $groupby:  The Group By to use

API Tags:
Return:  The requested query
Static:  


[ Top ]
having  [line 160]

  String having( [String $having = '']  )

Return the HAVING part of the query

Parameters:
String   $having:  The HAVING to use

API Tags:
Return:  The requested query
Static:  


[ Top ]
limit  [line 176]

  String limit( [String $skip = ''], [String $show = '']  )

Return the LIMIT [$skip,] $show The Limit part of the query

Parameters:
String   $skip:  The skip number of lines
String   $show:  The number of lines to show

API Tags:
Return:  The requested query
Static:  


[ Top ]
orderby  [line 126]

  String orderby( [String $orderby = ''], [String $sorted = SORT_BY_DEFAULT]  )

Return the ORDER BY part of the query

Parameters:
String   $orderby:  The Order By to use
String   $sorted:  The sorted asc/desc

API Tags:
Return:  The requested query
Static:  


[ Top ]
select  [line 60]

  String select( String $table, boolean $translate  )

Return the SELECT part of the query

Parameters:
String   $table:  The table to use
boolean   $translate:  The query is translated to language (true)

API Tags:
Return:  The requested query
Global:  DEFINE_QUERY_SELECT 0: The Select Table for a Query
Global:  TRANSLATE_QUERY 1: The name of the translation array
Static:  


Redefined in descendants as:

[ Top ]
translate  [line 47]

  String translate( String $key, [mixed $name = '']  )

Return the translated SQL to language specific

Parameters:
String   $key:  The query key to translate

API Tags:
Return:  The translated query key
Static:  


[ Top ]
where  [line 101]

  String where( String $table, [String $id = ''], [String $sid = '']  )

Return the WHERE part of the query

Parameters:
String   $table:  The table to use
String   $id:  The primary key to use
String   $sid:  The foriegn key to use

API Tags:
Return:  The requested query
Static:  


[ Top ]

Documentation generated on Thu, 22 Dec 2005 17:15:56 +0100 by phpDocumentor 1.3.0RC3