<?php
function item_Exists($table, $item) {
$table = mysql_real_escape_string($table);
$item = (int)$item;
$query = mysql_query("SELECT COUNT(id) FROM '$table' WHERE 'id' = $item");
return (mysql_result($query, 0) == 1) ? true : false;
}
function rate($table, $item, $rating) {
$table = mysql_real_escape_string($table);
$item = (int)$item;
$rating = (int)$rating;
mysql_query("UPDATE '$table' SET 'ukupno_glasova' = 'ukupno_glasova' + $rating, 'glasanje' = 'glasanje' + 1 WHERE 'id' = $item");
}
?>
so this is my code, and when i start this script it gives me error : "Warning: mysql_result() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\glasanje\core\func\rating.php on line 9" help?