Error showing an output and sql print

0
275

echo $item->request;

// Print last SQL query string
$wpdb->last_query
// Print last SQL query result
$wpdb->last_result
// Print last SQL query Error
$wpdb->last_error

Note, that you will only get the result when you have set defined( 'SAVEQUERIES', true ); in your wp-config.php.

define( 'WP_DEBUG_LOG', true );