Title: wpdb::get_caller
Published: April 25, 2014
Last modified: February 24, 2026

---

# wpdb::get_caller(): string

## In this article

 * [Return](https://developer.wordpress.org/reference/classes/wpdb/get_caller/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wpdb/get_caller/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wpdb/get_caller/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/wpdb/get_caller/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/wpdb/get_caller/?output_format=md#wp--skip-link--target)

Retrieves a comma-separated list of the names of the functions that called [wpdb](https://developer.wordpress.org/reference/classes/wpdb/).

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wpdb/get_caller/?output_format=md#return)󠁿

 string Comma-separated list of the calling functions.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wpdb/get_caller/?output_format=md#source)󠁿

    ```php
    public function get_caller() {
    	return wp_debug_backtrace_summary( __CLASS__ );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wpdb.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/class-wpdb.php#L4126)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/class-wpdb.php#L4126-L4128)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wpdb/get_caller/?output_format=md#related)󠁿

| Uses | Description | 
| [wp_debug_backtrace_summary()](https://developer.wordpress.org/reference/functions/wp_debug_backtrace_summary/)`wp-includes/functions.php` |

Returns a comma-separated string or array of functions that have been called to get to the current point in code.

  |

| Used by | Description | 
| [wpdb::_do_query()](https://developer.wordpress.org/reference/classes/wpdb/_do_query/)`wp-includes/class-wpdb.php` |

Internal function to perform the mysqli_query() call.

  | 
| [wpdb::print_error()](https://developer.wordpress.org/reference/classes/wpdb/print_error/)`wp-includes/class-wpdb.php` |

Prints SQL/DB error.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wpdb/get_caller/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.5.0](https://developer.wordpress.org/reference/since/2.5.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwpdb%2Fget_caller%2F)
before being able to contribute a note or feedback.