ad_general_link_format_rating_result

one of the documented procedures in this installation of the ACS
Usage:
ad_general_link_format_rating_result   db   link_id
What it does:
Displays link's rating.
Defined in: /web/philip/tcl/ad-general-links.tcl

Source code:



    set selection [ns_db 0or1row $db "
    select n_ratings, avg_rating
    from general_links
    where link_id = $link_id
    "]

    if { [empty_string_p $selection] } {
	set n_ratings 0
	set avg_rating 0
    } else {
	set_variables_after_query
    }


    if { $n_ratings == 0 } {
	return "
	<b>No ratings</b>
	"
    } else {
	return "
	<b>Average Rating</b>: $avg_rating; <b>Number of Ratings</b>: $n_ratings
	"
    }



philg@mit.edu