I'm programming a little script and i'm getting an error while trying to get some data from the database.
The error is the following:
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '= 'can_sign_in' LIMIT 1' at line 1
And the code is this:
public function hasFuseRight($rank, $fuseright){
global $MySQL;
$rank_id = FilterText($rank);
$right = $fuseright;
$query = $MySQL->Query("SELECT * FROM system_fuserights WHERE rank_id = '".$rank_id."' AND right = '".$right."' LIMIT 1");
$check = $MySQL->numRows($query);
return $check;
}
And the code which calls the function is:
$userRank = $users->getUserRank($username);
$right = 'can_sign_in';
echo $users->hasFuseRight($userRank, $right);
I have tried and tried but didn't found the fix... If anyone could help me i would be very thankful :)