log_query example

$this->timer_start();
        }

        if ( ! empty( $this->dbh ) && $this->use_mysqli ) {
            $this->result = mysqli_query( $this->dbh, $query );
        } elseif ( ! empty( $this->dbh ) ) {
            $this->result = mysql_query( $query$this->dbh );
        }
        $this->num_queries++;

        if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ) {
            $this->log_query(
                $query,
                $this->timer_stop(),
                $this->get_caller(),
                $this->time_start,
                array()
            );
        }
    }

    /** * Logs query data. * * @since 5.3.0 * * @param string $query The query's SQL. * @param float $query_time Total time spent on the query, in seconds. * @param string $query_callstack Comma-separated list of the calling functions. * @param float $query_start Unix timestamp of the time at the start of the query. * @param array $query_data Custom query data. */
Home | Imprint | This part of the site doesn't use cookies.