fixed problem with db_escape_string, need to specify the current link