Title: Different return values from $wpdb-&gt;get_var if using debugger
Last modified: August 19, 2016

---

# Different return values from $wpdb->get_var if using debugger

 *  [Stephane Boisvert](https://wordpress.org/support/users/sboisvert/)
 * (@sboisvert)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/different-return-values-from-wpdb-get_var-if-using-debugger/)
 * Good day,
 * When running a query like this:
    $UserID = $wpdb->get_var(“SELECT ID FROM $wpdb-
   >users WHERE user_email LIKE ’email@email.com’); on WP 3.01 on the main site 
   on a MS install, with no caching plugin installed. on PHP 5.3.2-1ubuntu4.2 if
   I step into the get_var function I will get the correct null result. if I let
   it run by itself it will return the string 0. Now its not just the presence of
   the debugger because if I step over the entire function the return will be string
   0. I need to really walk into the entire function to get null.
 * I really have no idea what to make of this. I’ve added checks for the string 
   0. I’m putting this here really in the hope that if others find it and have similar
   problems or have had similar problems they can enlighten me.
    The only “non-standard”
   extension we have installed may be x-cache, but I suspect its disabled when the
   debugger (dbg) is running.
 * if anyone has any hints please let me know.
 * Thank you,

The topic ‘Different return values from $wpdb->get_var if using debugger’ is closed
to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [Stephane Boisvert](https://wordpress.org/support/users/sboisvert/)
 * Last activity: [15 years, 8 months ago](https://wordpress.org/support/topic/different-return-values-from-wpdb-get_var-if-using-debugger/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
