I have problem with this code show mi error Warning: mysql_result() expects parameter 1 to be resource, boolean given in C:\wamp\www\blogcode\resources\func\blog.php on line 34
function category_exists($name){
$name = mysql_real_escape_string($name);
$query = mysql_query("SELECT COUNT(1) FROM 'categories' WHERE 'name'= '{$name}'");
return (mysql_result($query, 0)=='0') ? false:true;
}
How to fix this problem?