PHP Cross Reference of WordPress Subversion HEAD |
| [ Index ] [ Classes ] [ Functions ] [ Variables ] [ Constants ] |
[Source view] [Print]
(no description)
| File Size: | 511 lines (15 kb) |
| Included or required: | 1 time |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
wpdb:: (26 methods):
wpdb()
__construct()
__destruct()
set_prefix()
select()
escape()
escape_by_ref()
prepare()
print_error()
show_errors()
hide_errors()
flush()
query()
insert()
update()
get_var()
get_row()
get_col()
get_results()
get_col_info()
timer_start()
timer_stop()
bail()
check_database_version()
supports_collation()
get_caller()
| wpdb($dbuser, $dbpassword, $dbname, $dbhost) X-Ref |
| Connects to the database server and selects a database param: string $dbuser param: string $dbpassword param: string $dbname param: string $dbhost |
| __construct($dbuser, $dbpassword, $dbname, $dbhost) X-Ref |
| No description |
| __destruct() X-Ref |
| No description |
| set_prefix($prefix) X-Ref |
| No description |
| select($db) X-Ref |
| Selects a database using the current class's $this->dbh param: string $db name |
| escape($string) X-Ref |
| Escapes content for insertion into the database, for security param: string $string return: string query safe string |
| escape_by_ref(&$s) X-Ref |
| Escapes content by reference for insertion into the database, for security param: string $s |
| prepare($args=NULL) X-Ref |
| Prepares a SQL query for safe use, using sprintf() syntax |
| print_error($str = '') X-Ref |
| No description |
| show_errors() X-Ref |
| No description |
| hide_errors() X-Ref |
| No description |
| flush() X-Ref |
| No description |
| query($query) X-Ref |
| No description |
| insert($table, $data) X-Ref |
| Insert an array of data into a table param: string $table WARNING: not sanitized! param: array $data should not already be SQL-escaped return: mixed results of $this->query() |
| update($table, $data, $where) X-Ref |
| Update a row in the table with an array of data param: string $table WARNING: not sanitized! param: array $data should not already be SQL-escaped param: array $where a named array of WHERE column => value relationships. Multiple member pairs will be joined with ANDs. WARNING: the column names are not currently sanitized! return: mixed results of $this->query() |
| get_var($query=null, $x = 0, $y = 0) X-Ref |
| Get one variable from the database param: string $query (can be null as well, for caching, see codex) param: int $x = 0 row num to return param: int $y = 0 col num to return return: mixed results |
| get_row($query = null, $output = OBJECT, $y = 0) X-Ref |
| Get one row from the database param: string $query param: string $output ARRAY_A | ARRAY_N | OBJECT param: int $y row num to return return: mixed results |
| get_col($query = null , $x = 0) X-Ref |
| Gets one column from the database param: string $query (can be null as well, for caching, see codex) param: int $x col num to return return: array results |
| get_results($query = null, $output = OBJECT) X-Ref |
| Return an entire result set from the database param: string $query (can also be null to pull from the cache) param: string $output ARRAY_A | ARRAY_N | OBJECT return: mixed results |
| get_col_info($info_type = 'name', $col_offset = -1) X-Ref |
| Grabs column metadata from the last query param: string $info_type one of name, table, def, max_length, not_null, primary_key, multiple_key, unique_key, numeric, blob, type, unsigned, zerofill param: int $col_offset 0: col name. 1: which table the col's in. 2: col's max length. 3: if the col is numeric. 4: col's type return: mixed results |
| timer_start() X-Ref |
| Starts the timer, for debugging purposes |
| timer_stop() X-Ref |
| Stops the debugging timer return: int total time spent on the query, in milliseconds |
| bail($message) X-Ref |
| Wraps fatal errors in a nice header and footer and dies. param: string $message |
| check_database_version() X-Ref |
| Checks wether of not the database version is high enough to support the features WordPress uses |
| supports_collation() X-Ref |
| This function is called when WordPress is generating the table schema to determine wether or not the current database supports or needs the collation statements. |
| get_caller() X-Ref |
| Get the name of the function that called wpdb. return: string the name of the calling function |
| Generated Thu Dec 6 06:47:08 2007 for RedAlt XRefs | Cross-referenced by PHPXref 0.6 and RedAlt |