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

Class: MDB_QueryTool_EasyJoin

Source Location: /MDB_QueryTool-1.2.3/MDB/QueryTool/EasyJoin.php

Class Overview

MDB_QueryTool_Query
   |
   --MDB_QueryTool_EasyJoin

MDB_QueryTool_EasyJoin class


Author(s):

Copyright:

  • 2003-2007 Lorenzo Alberton

Methods


Child classes:

MDB_QueryTool
MDB_QueryTool class

Inherited Variables

Inherited Methods

Class: MDB_QueryTool_Query

MDB_QueryTool_Query::MDB_QueryTool_Query()
Constructor
MDB_QueryTool_Query::add()
add a new member in the DB
MDB_QueryTool_Query::addHaving()
Extend the current HAVING clause. This is very useful, when you are building this clause from different places and don't want to overwrite the currently set HAVING clause, but extend it.
MDB_QueryTool_Query::addJoin()
adds a table and a where clause that shall be used for the join
MDB_QueryTool_Query::addLeftJoin()
Add a LEFT JOIN clause
MDB_QueryTool_Query::addMultiple()
adds multiple new members in the DB
MDB_QueryTool_Query::addOrder()
Add a ORDER BY parameter to the query.
MDB_QueryTool_Query::addSelect()
add a string to the select-part of the query and connects it to an existing string using the $connectString, which by default is a comma.
MDB_QueryTool_Query::addWhere()
Only adds a string to the WHERE clause
MDB_QueryTool_Query::addWhereSearch()
add a WHERE-LIKE clause which works like a search for the given string
MDB_QueryTool_Query::connect()
use this method if you want to connect manually
MDB_QueryTool_Query::debug()
overwrite this method and i.e. print the query $string to see the final query
MDB_QueryTool_Query::execute()
Execute the query
MDB_QueryTool_Query::get()
get the data of a single entry if the second parameter is only one column the result will be returned directly not as an array!
MDB_QueryTool_Query::getAll()
get all entries from the DB for sorting use setOrder!!!, the last 2 parameters are deprecated
MDB_QueryTool_Query::getCol()
this method only returns one column, so the result will be a one dimensional array
MDB_QueryTool_Query::getCount()
get the number of entries
MDB_QueryTool_Query::getDbInstance()
Get a MDB[2] object instance
MDB_QueryTool_Query::getDefaultValues()
return an empty element where all the array elements do already exist corresponding to the columns in the DB
MDB_QueryTool_Query::getDontSelect()
Get the columns that shall not be selected
MDB_QueryTool_Query::getEmptyElement()
this is just for BC
MDB_QueryTool_Query::getGroup()
gets the group condition which is used for the current instance
MDB_QueryTool_Query::getHaving()
gets the HAVING definition which is used for the current instance
MDB_QueryTool_Query::getIndex()
get index
MDB_QueryTool_Query::getJoin()
gets the join-condition
MDB_QueryTool_Query::getLimit()
gets query limits
MDB_QueryTool_Query::getMultiple()
gets the data of the given ids
MDB_QueryTool_Query::getOne()
get the first value of the first row
MDB_QueryTool_Query::getOption()
Get the given option
MDB_QueryTool_Query::getOrder()
gets the ORDER BY condition which is used for the current instance
MDB_QueryTool_Query::getQueryString()
Render the current query and return it as a string.
MDB_QueryTool_Query::getSelect()
Get the SELECT clause
MDB_QueryTool_Query::getTable()
gets the table this class is currently working on
MDB_QueryTool_Query::getTableShortName()
Gets the short name for a table
MDB_QueryTool_Query::getTableSpec()
gets the tableSpec either indexed by the short name or the name returns the array for the tables given as parameter or if no parameter given for all tables that exist in the tableSpec
MDB_QueryTool_Query::getWhere()
Gets the WHERE condition which is used for the current instance
MDB_QueryTool_Query::metadata()
!!!! query COPIED FROM db_oci8.inc - from PHPLIB !!!!
MDB_QueryTool_Query::newEntity()
Returns a new entity including an instance to QueryTool
MDB_QueryTool_Query::remove()
removes a member from the DB
MDB_QueryTool_Query::removeAll()
empty a table
MDB_QueryTool_Query::removeMultiple()
remove the datasets with the given IDs
MDB_QueryTool_Query::removePrimary()
removes a member from the DB and calls the remove methods of the given objects so all rows in another table that refer to this table are erased too
MDB_QueryTool_Query::reset()
reset all the set* settings; with no parameter given, it resets them all.
MDB_QueryTool_Query::returnResult()
Return the chosen result type
MDB_QueryTool_Query::save()
save data, calls either update or add if the primaryCol is given in the data this method knows that the data passed to it are meant to be updated (call 'update'), otherwise it will call the method 'add'.
MDB_QueryTool_Query::setDbInstance()
Setup using an existing connection.
MDB_QueryTool_Query::setDontSelect()
Set the columns that shall not be selected
MDB_QueryTool_Query::setErrorCallback()
set both callbacks
MDB_QueryTool_Query::setErrorLogCallback()
set error log callback
MDB_QueryTool_Query::setErrorSetCallback()
set error set callback
MDB_QueryTool_Query::setGroup()
sets the group-by condition
MDB_QueryTool_Query::setHaving()
sets the HAVING definition
MDB_QueryTool_Query::setIndex()
format the result to be indexed by $key
MDB_QueryTool_Query::setJoin()
sets a join-condition
MDB_QueryTool_Query::setLeftJoin()
if you do a left join on $this->table you will get all entries
MDB_QueryTool_Query::setLimit()
sets query limits
MDB_QueryTool_Query::setOption()
set mode the class shall work in currently we have the modes: 'raw' does not quote the data before building the query
MDB_QueryTool_Query::setOrder()
sets the ORDER BY condition which is used for the current instance
MDB_QueryTool_Query::setReturnClass()
Sets the name of the class to use as result object
MDB_QueryTool_Query::setRightJoin()
see setLeftJoin for further explaination on what a left/right join is
MDB_QueryTool_Query::setSelect()
limit the result to return only the columns given in $what
MDB_QueryTool_Query::setTable()
sets the table this class is currently working on
MDB_QueryTool_Query::setWhere()
Sets the WHERE condition which is used for the current instance
MDB_QueryTool_Query::update()
update the member data of a data set
MDB_QueryTool_Query::useResult()
Choose the type of the returned result
MDB_QueryTool_Query::writeLog()
Write events to the logfile.
MDB_QueryTool_Query::_checkColumns()
checks if the columns which are given as the array's indexes really exist if not it will be unset anyway
MDB_QueryTool_Query::_makeIndexed()
Make data indexed

Class Details

[line 54]
MDB_QueryTool_EasyJoin class


[ Top ]


Method Detail

__construct (Constructor)   [line 84]

MDB_QueryTool_EasyJoin __construct( [mixed $dsn = false], [array $options = array()], [integer $version = 1])

call parent constructor

Parameters:

mixed   $dsn     DSN string, DSN array or MDB object
array   $options     db options
integer   $version     MDB version (1=MDB, 2=MDB2)

[ Top ]

autoJoin   [line 102]

void autoJoin( array $tables)

join the tables given, using the column names, to find out how to join

the tables this is, if table1 has a column names table2_id this method will join WHERE table1.table2_id=table2.id all joins made here are only concatenated via AND


Parameters:

array   $tables     list of tables to join

[ Top ]


Documentation generated on Wed, 11 Apr 2012 22:30:03 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.