• 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

    (@xxdarkie)

    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.