Open Source Content Management Framework

mgd_update_article_score

  1. Description

mgd_update_article_score -- Set the score of an article

Description

`bool **mgd_update_article_score** (int id, int score)`

Minimum version: Midgard 1.2

Sets the score field of an article. The score field is used in functions like mgd_list_topic_articles() to control the order of the returned articles. Only owners of an article are allowed to modify the score.

Returns TRUE on success, FALSE on failure.

<?php
     $id      = 123;
     $score = 13;
     $update = mgd_update_article_score( $id, $score );
     if(! $update ) {
       echo "Update score of article $id failed.
\n"; echo "reason: " . mgd_errstr(); } else { echo "Updated score of article $id."; } ?>
Designed by Nemein, hosted by Kafit