mgd_update_topic_score

(Midgard 1.4.2 'Bifrost')

mgd_update_topic_score -- Change the score of a topic

Description

bool mgd_update_topic_score (int id, int score)

Minimum version: Midgard 1.1.1

Changes the score of topic with id id to score. Only owners of the topic are allowed to change the score.

Returns TRUE if successful. Returns FALSE on failure.


<?php
  $id    = 17;
  $score = 169;
  $setscore = mgd_update_topic_score($id,$score);
  if(!$setscore) {
    echo "update of topic score failed.<br>";
    echo "reason: " . mgd_errstr();
  }else{
    echo "updated topic score"'
  }
?>