I've tested both queries as working properly. I don't know what more to tell you.
Outputs 1 if the DISPLAYED user is connected to the VIEWING user:
Code:
SELECT `accepted` FROM `#__comprofiler_members` WHERE `referenceid` = '[user_id]' AND `memberid` = '[cb:userdata field="user_id" user="#me" /]'
Outputs 1 if the VIEWING user is connected to the DISPLAYED user:
Code:
SELECT `accepted` FROM `#__comprofiler_members` WHERE `memberid` = '[user_id]' AND `referenceid` = '[cb:userdata field="user_id" user="#me" /]'
Both of which should be added to a regular "Query" fieldtype (not a query select). Next within Parameters > Layouts for the field set the layout as follows.
Profile Value Layout:
[cb:if FIELD_NAME="1"]I am connected to this user![/cb:if]
[cb:if FIELD_NAME!="1"]I am NOT connected to this user![/cb:if]
If you're still having problems please consult with a freelance developer to implement it for you as I've provided you with ample examples to have what you're wanting short of configuring it for you, which we do not provide here. I suggest the first query if you're using cross connections as it ensures the user has accepted your request before it outputs 1.