last query in wordpress code example Example: wpdb last query // Print last SQL query string echo $wpdb->last_query;