PHP 클래스 ezSQLcore

파일 보기 프로젝트 열기: jv2222/ezsql 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$cache_dir
$cache_inserts
$cache_queries
$cache_timeout
$captured_errors
$col_info
$conn_queries
$db_connect_time
$debug_all same as $debug_all
$debug_called same as $trace
$debug_echo_is_on == TJH == default now needed for echo of debug function
$do_profile
$last_error
$last_query
$num_queries
$profile_times
$show_errors
$sql_log_file
$timers hours
$total_query_time
$trace
$trace_log
$use_disk_cache
$use_trace_log
$vardump_called

공개 메소드들

메소드 설명
__construct ( ) ******************************************************************** Constructor
count ( boolean $all = true, boolean $increase = false ) : integer Function for operating query count
debug ( $print_to_screen = true ) ******************************************************************** Displays the last query string that was sent to the database & a table listing results (if there were any).
donation ( ) ******************************************************************** Naughty little function to ask for some remuniration!
dumpvar ( $mixed ) ******************************************************************** Alias for the above function
flush ( ) ******************************************************************** Kill cached query results
get_cache ( $query ) ******************************************************************** get_cache
get_col ( $query = null, $x ) ******************************************************************** Function to get 1 column from the cached result set based in X index see docs for usage and info
get_col_info ( $info_type = "name", $col_offset ) ******************************************************************** Function to get column meta data info pertaining to the last query see docs for more info and usage
get_host_port ( $host, $default = false ) ******************************************************************** Get host and port from an "host:port" notation.
get_results ( $query = null, $output = OBJECT ) ******************************************************************** Return the the query as a result set - see docs for more details
get_row ( $query = null, $output = OBJECT, $y ) ******************************************************************** Get one row from the DB - see docs for more detail
get_set ( $params ) ******************************************************************** Creates a SET nvp sql string from an associative array (and escapes all values)
get_var ( $query = null, $x, $y ) ******************************************************************** Get one variable from the DB - see docs for more detail
hide_errors ( )
register_error ( $err_str ) ******************************************************************** Print SQL/DB error - over-ridden by specific DB class
show_errors ( ) ******************************************************************** Turn error handling on or off.
store_cache ( $query, $is_insert ) ******************************************************************** store_cache
timer_elapsed ( $timer_name )
timer_get_cur ( ) ******************************************************************** Timer related functions
timer_start ( $timer_name )
timer_update_global ( $timer_name )
vardump ( $mixed = '' ) ******************************************************************** Dumps the contents of any input variable to screen in a nicely formatted and easy to understand way - any type: Object, Var or Array

메소드 상세

__construct() 공개 메소드

******************************************************************** Constructor
public __construct ( )

count() 공개 메소드

Function for operating query count
public count ( boolean $all = true, boolean $increase = false ) : integer
$all boolean Set to false for function to return queries only during this connection
$increase boolean Set to true to increase query count (internal usage)
리턴 integer Returns query count base on $all

debug() 공개 메소드

(abstracted into a seperate file to save server overhead).
public debug ( $print_to_screen = true )

donation() 공개 메소드

******************************************************************** Naughty little function to ask for some remuniration!
public donation ( )

dumpvar() 공개 메소드

******************************************************************** Alias for the above function
public dumpvar ( $mixed )

flush() 공개 메소드

******************************************************************** Kill cached query results
public flush ( )

get_cache() 공개 메소드

******************************************************************** get_cache
public get_cache ( $query )

get_col() 공개 메소드

******************************************************************** Function to get 1 column from the cached result set based in X index see docs for usage and info
public get_col ( $query = null, $x )

get_col_info() 공개 메소드

******************************************************************** Function to get column meta data info pertaining to the last query see docs for more info and usage
public get_col_info ( $info_type = "name", $col_offset )

get_host_port() 공개 메소드

Returns array of host and port. If port is omitted, returns $default
public get_host_port ( $host, $default = false )

get_results() 공개 메소드

******************************************************************** Return the the query as a result set - see docs for more details
public get_results ( $query = null, $output = OBJECT )

get_row() 공개 메소드

******************************************************************** Get one row from the DB - see docs for more detail
public get_row ( $query = null, $output = OBJECT, $y )

get_set() 공개 메소드

Usage: $db_data = array('login'=>'jv','email'=>'[email protected]', 'user_id' => 1, 'created' => 'NOW()'); $db->query("INSERT INTO users SET ".$db->get_set($db_data)); ...OR... $db->query("UPDATE users SET ".$db->get_set($db_data)." WHERE user_id = 1"); Output: login = 'jv', email = '[email protected]', user_id = 1, created = NOW()
public get_set ( $params )

get_var() 공개 메소드

******************************************************************** Get one variable from the DB - see docs for more detail
public get_var ( $query = null, $x, $y )

hide_errors() 공개 메소드

public hide_errors ( )

register_error() 공개 메소드

******************************************************************** Print SQL/DB error - over-ridden by specific DB class
public register_error ( $err_str )

show_errors() 공개 메소드

.
public show_errors ( )

store_cache() 공개 메소드

******************************************************************** store_cache
public store_cache ( $query, $is_insert )

timer_elapsed() 공개 메소드

public timer_elapsed ( $timer_name )

timer_get_cur() 공개 메소드

******************************************************************** Timer related functions
public timer_get_cur ( )

timer_start() 공개 메소드

public timer_start ( $timer_name )

timer_update_global() 공개 메소드

public timer_update_global ( $timer_name )

vardump() 공개 메소드

******************************************************************** Dumps the contents of any input variable to screen in a nicely formatted and easy to understand way - any type: Object, Var or Array
public vardump ( $mixed = '' )

프로퍼티 상세

$cache_dir 공개적으로 프로퍼티

public $cache_dir

$cache_inserts 공개적으로 프로퍼티

public $cache_inserts

$cache_queries 공개적으로 프로퍼티

public $cache_queries

$cache_timeout 공개적으로 프로퍼티

public $cache_timeout

$captured_errors 공개적으로 프로퍼티

public $captured_errors

$col_info 공개적으로 프로퍼티

public $col_info

$conn_queries 공개적으로 프로퍼티

public $conn_queries

$db_connect_time 공개적으로 프로퍼티

public $db_connect_time

$debug_all 공개적으로 프로퍼티

same as $debug_all
public $debug_all

$debug_called 공개적으로 프로퍼티

same as $trace
public $debug_called

$debug_echo_is_on 공개적으로 프로퍼티

== TJH == default now needed for echo of debug function
public $debug_echo_is_on

$do_profile 공개적으로 프로퍼티

public $do_profile

$last_error 공개적으로 프로퍼티

public $last_error

$last_query 공개적으로 프로퍼티

public $last_query

$num_queries 공개적으로 프로퍼티

public $num_queries

$profile_times 공개적으로 프로퍼티

public $profile_times

$show_errors 공개적으로 프로퍼티

public $show_errors

$sql_log_file 공개적으로 프로퍼티

public $sql_log_file

$timers 공개적으로 프로퍼티

hours
public $timers

$total_query_time 공개적으로 프로퍼티

public $total_query_time

$trace 공개적으로 프로퍼티

public $trace

$trace_log 공개적으로 프로퍼티

public $trace_log

$use_disk_cache 공개적으로 프로퍼티

public $use_disk_cache

$use_trace_log 공개적으로 프로퍼티

public $use_trace_log

$vardump_called 공개적으로 프로퍼티

public $vardump_called