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

Class: DB_QueryTool

Source Location: /DB_QueryTool-1.1.2/QueryTool.php

Class Overview

DB_QueryTool_Query
   |
   --DB_QueryTool_EasyJoin
      |
      --DB_QueryTool

MDB_QueryTool class


Author(s):

Copyright:

  • 2003-2007 Wolfram Kriesing

Methods


Child classes:

user
MDB_QueryTool class

Inherited Variables

Inherited Methods

Class: DB_QueryTool_EasyJoin

DB_QueryTool_EasyJoin::__construct()
call parent constructor
DB_QueryTool_EasyJoin::autoJoin()
Join the given tables, using the column names, to find out how to join the tables; i.e., if table1 has a column named "table2_id", this method will join "WHERE table1.table2_id=table2.id".

Class: DB_QueryTool_Query

DB_QueryTool_Query::DB_QueryTool_Query()
Constructor
DB_QueryTool_Query::add()
add a new member in the DB
DB_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.
DB_QueryTool_Query::addJoin()
adds a table and a where clause that shall be used for the join
DB_QueryTool_Query::addLeftJoin()
add a LEFT JOIN clause
DB_QueryTool_Query::addMultiple()
adds multiple new members in the DB
DB_QueryTool_Query::addOrder()
Add a ORDER BY parameter to the query.
DB_QueryTool_Query::addSelect()
add a string to the select part of the query 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.
DB_QueryTool_Query::addWhere()
only adds a string to the WHERE clause
DB_QueryTool_Query::addWhereSearch()
add a WHERE-LIKE clause which works like a search for the given string
DB_QueryTool_Query::connect()
use this method if you want to connect manually
DB_QueryTool_Query::debug()
overwrite this method and i.e. print the query $string to see the final query
DB_QueryTool_Query::execute()
Execute the query
DB_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!
DB_QueryTool_Query::getAll()
get all entries from the DB for sorting use setOrder!!!, the last 2 parameters are deprecated
DB_QueryTool_Query::getCol()
this method only returns one column, so the result will be a one dimensional array
DB_QueryTool_Query::getCount()
get the number of entries
DB_QueryTool_Query::getDbInstance()
Get the current DB instance
DB_QueryTool_Query::getDefaultValues()
return an empty element where all the array elements do already exist corresponding to the columns in the DB
DB_QueryTool_Query::getDontSelect()
Get the column(s) to be ignored
DB_QueryTool_Query::getEmptyElement()
this is just for BC
DB_QueryTool_Query::getGroup()
gets the group condition which is used for the current instance
DB_QueryTool_Query::getHaving()
gets the HAVING definition which is used for the current instance
DB_QueryTool_Query::getIndex()
Get the index
DB_QueryTool_Query::getJoin()
gets the join-condition
DB_QueryTool_Query::getLimit()
gets query limits
DB_QueryTool_Query::getMultiple()
gets the data of the given ids
DB_QueryTool_Query::getOne()
get the first value of the first row
DB_QueryTool_Query::getOption()
Get the option value
DB_QueryTool_Query::getOrder()
gets the ORDER BY condition which is used for the current instance
DB_QueryTool_Query::getQueryString()
Render the current query and return it as a string.
DB_QueryTool_Query::getSelect()
Get the SELECT clause
DB_QueryTool_Query::getTable()
gets the table this class is currently working on
DB_QueryTool_Query::getTableShortName()
Gets the short name for a table
DB_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
DB_QueryTool_Query::getWhere()
gets the WHERE condition which is used for the current instance
DB_QueryTool_Query::metadata()
!!!! query COPIED FROM db_oci8.inc - from PHPLIB !!!!
DB_QueryTool_Query::remove()
removes a member from the DB
DB_QueryTool_Query::removeAll()
empty a table
DB_QueryTool_Query::removeMultiple()
remove the datasets with the given ids
DB_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
DB_QueryTool_Query::reset()
reset all the set* settings; with no parameter given, it resets them all.
DB_QueryTool_Query::returnResult()
Return the chosen result type
DB_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'.
DB_QueryTool_Query::setDbInstance()
Setup using an existing connection.
DB_QueryTool_Query::setDontSelect()
Do not select the given column
DB_QueryTool_Query::setErrorCallback()
set both callbacks
DB_QueryTool_Query::setErrorLogCallback()
Set the name of the error log callback function
DB_QueryTool_Query::setErrorSetCallback()
Set the name of the error log callback function
DB_QueryTool_Query::setGroup()
sets the group-by condition
DB_QueryTool_Query::setHaving()
sets the HAVING definition
DB_QueryTool_Query::setIndex()
format the result to be indexed by $key
DB_QueryTool_Query::setJoin()
sets a join-condition
DB_QueryTool_Query::setLeftJoin()
if you do a left join on $this->table you will get all entries
DB_QueryTool_Query::setLimit()
sets query limits
DB_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
DB_QueryTool_Query::setOrder()
sets the ORDER BY condition which is used for the current instance
DB_QueryTool_Query::setRightJoin()
see setLeftJoin for further explaination on what a left/right join is NOTE: be sure to only use either a right or a left join //FIXXME check if the above sentence is necessary and if sql doesn't allow the use of both
DB_QueryTool_Query::setSelect()
limit the result to return only the columns given in $what
DB_QueryTool_Query::setTable()
sets the table this class is currently working on
DB_QueryTool_Query::setWhere()
sets the WHERE condition which is used for the current instance
DB_QueryTool_Query::update()
update the member data of a data set
DB_QueryTool_Query::useResult()
Choose the type of the returned result
DB_QueryTool_Query::writeLog()
Write events to the logfile.
DB_QueryTool_Query::_checkColumns()
checks if the columns which are given as the array's indexes really exist if not it will be unset anyway
DB_QueryTool_Query::_makeIndexed()
Make the data indexed

Class Details

[line 62]
MDB_QueryTool class

This class should be extended; it's here to make it easy using the base class of the package by its package name. Since I tried to seperate the functionality a bit inside the really working classes i decided to have this class here just to provide the name, since the functionality inside the other classes might be restructured a bit but this name always stays.



[ Top ]


Method Detail

DB_QueryTool (Constructor)   [line 72]

DB_QueryTool DB_QueryTool( [mixed $dsn = false], [array $options = array()])

Call parent constructor

Parameters:

mixed   $dsn   —  DSN string, DSN array or DB object
array   $options   —  database options

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:14:42 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.