33 lines
727 B
PHP
33 lines
727 B
PHP
<?php
|
|
require_once "DBController.php";
|
|
|
|
class Rate extends DBController
|
|
{
|
|
|
|
function getAllPost($id)
|
|
{
|
|
$query = "SELECT laid id, rating FROM lieder_auffuehrung WHERE laid=$id";
|
|
$postResult = $this->getDBResult($query);
|
|
return $postResult;
|
|
}
|
|
|
|
|
|
function updateRatingCount($rating, $id)
|
|
{
|
|
$query = "UPDATE lieder_auffuehrung SET rating = ? WHERE laid= ?";
|
|
|
|
$params = array(
|
|
array(
|
|
"param_type" => "i",
|
|
"param_value" => $rating
|
|
),
|
|
array(
|
|
"param_type" => "i",
|
|
"param_value" => $id
|
|
)
|
|
);
|
|
|
|
$this->updateDB($query, $params);
|
|
}
|
|
}
|