Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/script-loader.php on line 757

Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/script-loader.php on line 757

Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/script-loader.php on line 758

Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/script-loader.php on line 758
here_format = null ) { $this->_query_profile( 'UPDATE ' . $table . ': ' . implode( '//', $data ) ); $result = $this->_dbi->update( $table, $data, $where, $format, $where_format ); $this->_query_profile( $result ); return $result; } /** * Retrieve all results from given table. * * @param string $table Name of table. * @param array $columns List of columns to retrieve. * @param string $output See {@see self::get_results()} $output for more. * * @return array Collection. */ public function select( $table, array $columns, $output = OBJECT ) { $sql_query = 'SELECT `' . implode( '`, `', $columns ) . '` FROM `' . $this->get_table_name( $table ) . '`'; return $this->get_results( $sql_query, $output ); } /** * The database version number. * * @return false|string false on failure, version number on success */ public function db_version() { return $this->_dbi->db_version(); } /** * Return the id of last `insert` operation. * * @return int Returns integer optionally zero when no insert was performed. */ public function get_insert_id() { return $this->_dbi->insert_id; } /** * Return the full name for the table. * * @param string $table Table name. * * @return string Full table name for the table requested. */ public function get_table_name( $table = '' ) { static $prefix_len = null; if ( ! isset( $this->_dbi->{$table} ) ) { if ( null === $prefix_len ) { $prefix_len = strlen( $this->_dbi->prefix ); } if ( 0 === strncmp( $this->_dbi->prefix, $table, $prefix_len ) ) { return $table; } return $this->_dbi->prefix . $table; } return $this->_dbi->{$table}; } /** * Return escaped value. * * @param string $input Value to be escaped. * * @return string Escaped value. */ public function escape( $input ) { $this->_dbi->escape_by_ref( $input ); return $input; } /** * In debug mode prints DB queries table. * * @return void */ public function shutdown() { if ( ! $this->_log_enabled ) { return false; } echo '
'; $i = 0; $time = 0; foreach ( $this->_queries as $query ) { $time += $query['d']; echo ''; } echo '
N. Query Duration, ms Row Count
', ++$i, ' ', $query['q'], ' ', round( $query['d'] * 1000, 2 ), ' ', (int)$query['r'], '
Total time, ms: ', round( $time * 1000, 2 ), '
'; return true; } /** * Method aiding query profiling. * * How to use: * - on method resulting in query start call _query_profiler( 'SQL query' ) * - on it's end call _query_profiler( (int)number_of_rows|(bool)false ) * * @param mixed $query_or_result Query on first call, result on second. * * @return void */ protected function _query_profile( $query_or_result ) { static $last = null; if ( null === $last ) { $last = array( 'd' => microtime( true ), 'q' => $query_or_result, ); } else { if ( count( $this->_queries ) > 200 ) { array_shift( $this->_queries ); } $this->_queries[] = array( 'd' => microtime( true ) - $last['d'], 'q' => $last['q'], 'r' => $query_or_result, ); $last = null; } } }