Title: [BuddyPress] Problem while calling BP function
Last modified: August 19, 2016

---

# [BuddyPress] Problem while calling BP function

 *  [xXDarkie](https://wordpress.org/support/users/xxdarkie/)
 * (@xxdarkie)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/buddypress-problem-while-calling-bp-function/)
 * Hey,
    I honestly don’t know if this should go here or in the hacks forum, sorry
   if I’m wrong.
 * I’m using BuddyPress to play a bit with friends, group and stuff. While calling
   a friend function of BP I get this error message:
 * Warning: mysql_real_escape_string(): 11 is not a valid MySQL-Link resource in/
   path/to/wp-includes/wp-db.php on line 785
    Warning: mysql_error(): 11 is not 
   a valid MySQL-Link resource in /path/to/wp-includes/wp-db.php on line 1119
 * The warning at line 785 is repeated multiple times while the one at 1119 just
   once.
    Any thoughts of what’s going on?
 * Thanks

Viewing 1 replies (of 1 total)

 *  Thread Starter [xXDarkie](https://wordpress.org/support/users/xxdarkie/)
 * (@xxdarkie)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/buddypress-problem-while-calling-bp-function/#post-1896753)
 * I found out that my problem is that the query arrives with no parameters because
   of prepare() that trims them. No idea why. If I instead go directly for get_results()
   then the query arrives correctly up to $this->query($query, $dbh); in get_results(
   tracked it with print_r) but after that the result is empty even though in my
   DB the same query produces some result. Moreover I get those errors, this means
   that $dbh is not a valid resource. How could this be?

Viewing 1 replies (of 1 total)

The topic ‘[BuddyPress] Problem while calling BP function’ is closed to new replies.

 * 1 reply
 * 1 participant
 * Last reply from: [xXDarkie](https://wordpress.org/support/users/xxdarkie/)
 * Last activity: [15 years, 4 months ago](https://wordpress.org/support/topic/buddypress-problem-while-calling-bp-function/#post-1896753)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
