The MU forums have moved to WordPress.org

mysql_real_escape_string(): 10 is not a valid MySQL-Link resource (1 post)

  1. croakingtoad
    Member
    Posted 14 years ago #

    I'm trying to integrate Google Maps into one of my themes but am getting this error. I'm using http://www.phpinsider.com/php/code/GoogleMapAPI/ as the resource. I've tried renaming the function thinking maybe it was a naming conflict but that doesn't seem to be it?

    Warning: mysql_real_escape_string(): 10 is not a valid MySQL-Link resource in /home/roanoke/public_html/wp-includes/wp-db.php on line 527

    Warning: mysql_real_escape_string(): 10 is not a valid MySQL-Link resource in /home/roanoke/public_html/wp-includes/wp-db.php on line 527

    Warning: mysql_error(): 10 is not a valid MySQL-Link resource in /home/roanoke/public_html/wp-includes/wp-db.php on line 821

    The code I have in my theme is-

    require_once('/home/geez/public_html/wp-content/themes/geez-home/assets/php/GoogleMapAPI.class.php');
        $map = new GoogleMapAPI('restaurants');
        $map->setDSN('mysql://foo:pass?@localhost/geez_geocodes');
        $map->setAPIKey('123-iXq-456-g');

    Obviously the sensitive stuff is sanitized.

    Any idea what the problem could be?

About this Topic

  • Started 14 years ago by croakingtoad