Class QueryExplain

Description

Located in /QueryExplain.php (line 46)


	
			
Method Summary
QueryExplain __construct (callback $get_connection_func, array $sample)
null|string explain ()
string get_create ()
{string} result_as_table ({MySQLi_Result} $result)
Methods
Constructor __construct (line 63)

Constructor. See class documentation for explaination of the parameters

  • throws: Exception if a database connection cannot be made
QueryExplain __construct (callback $get_connection_func, array $sample)
  • callback $get_connection_func: The callback function
  • array $sample: array of information about the query
explain (line 142)

If the given query is a SELECT statement, return the explain plan

  • return: The explain plan, or an error message
  • access: public
null|string explain ()
get_create (line 89)

Extract the table names from a query, and return the result of SHOW CREATE TABLE tablename;

  • return: the create table statements, or an error message
  • access: public
string get_create ()
get_tables_from_query (line 78)

Try to parse the real table names out of a sql query

  • return: the list of tables in the query
  • access: public
array get_tables_from_query ()
get_table_status (line 116)

Extract the table names and the return the result of SHOW TABLE STATUS LIKE 'tablename' for each table;

  • access: public
null get_table_status ()
result_as_table (line 214)

given a mysqli result handle, format a string to look like the mysql cli

type tables

  • return: The formatted result set string
{string} result_as_table ({MySQLi_Result} $result)
  • {MySQLi_Result} $result: The result set handle

Documentation generated on Mon, 12 Mar 2012 11:59:41 -0700 by phpDocumentor 1.4.4