public static function get_contact(int $userid, int $contactid) {
        global $DB;

        $sql = "SELECT mc.*
                  FROM {message_contacts} mc
                 WHERE (mc.userid = ? AND mc.contactid = ?)
                    OR (mc.userid = ? AND mc.contactid = ?)";
        return $DB->get_record_sql($sql, [$userid, $contactid, $contactid, $userid]);
    }
public static function get_contact(int $userid, int $contactid) {
        global $DB;

        $sql = "SELECT mc.*
                  FROM {message_contacts} mc
                 WHERE (mc.userid = ? AND mc.contactid = ?)
                    OR (mc.userid = ? AND mc.contactid = ?)";
        return $DB->get_record_sql($sql, [$userid, $contactid, $contactid, $userid]);
    }
public static function get_contact ( int $ userid , int $ contactid ) { global $ DB ; $ sql = "SELECT mc.*
                  FROM {message_contacts} mc
                 WHERE (mc.userid = ? AND mc.contactid = ?)
                    OR (mc.userid = ? AND mc.contactid = ?)" ; return $ DB -> get_record_sql ( $ sql , [ $ userid , $ contactid , $ contactid , $ userid ] ) ; }
Returns the row in the database table message_contacts that represents the contact between two people.

@param int $userid The id of one of the users
@param int $contactid The id of the other user
@return mixed A fieldset object containing the record, false otherwise
Returns the row in the database table message_contacts that represents the contact between two people .