Function Reference: geodir_get_commentoverall

Summary

Get overall rating of a comment.

Description

Returns overall rating of a comment. If no results, returns false.

Global Values

$wpdb
(object) (required) WordPress Database object.

Default: None

Package

GeoDirectory

Parameters

$comment_id
(int) (required) The comment ID.

Default: None

Return Values

(bool|null|string)

    Change Log

    Since: 1.0.0

    Source File

    geodir_get_commentoverall() is located in geodirectory-functions/comments_functions.php [Line: 709]

    Source Code

    function geodir_get_commentoverall($comment_id = 0)
    {
        global $wpdb;
    
        $reatings = $wpdb->get_var(
            $wpdb->prepare(
                "SELECT overall_rating FROM " . GEODIR_REVIEW_TABLE . " WHERE comment_id = %d",
                array($comment_id)
            )
        );
    
        if ($reatings)
            return $reatings;
        else
            return false;
    }