Initial commit
This commit is contained in:
32
lieder/star/Rate.php
Normal file
32
lieder/star/Rate.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user