Im trying to get a row, But it does not return anything on my site, But it works perfectly on local host.
public function GetVote($rel)
{
include 'config.php';
$stmt = $dbh->prepare("SELECT updown FROM user_votes WHERE UID = :id AND rel = :rel");
$stmt->bindParam(":id", $this->id);
$stmt->bindParam(":rel", $rel);
$stmt->execute();
$row = $stmt->fetch(PDO::FETCH_ASSOC);
return $row['updown'];
}
Running SQL on phpmyadmin, Site:

Running SQL on phpmyadmin, Local:

- I dont know why its saying there is no unique colum, VID is unique and auto-increment.
Table structure:

VIDis unique, but you are onlySELECTing theupdownfield... Therefore, you cannot edit the data being returned.