MyCode
$query = mysql_query("SELECT COUNT(`op_id`) FROM `room_group_options` WHERE `group` = '$group'");
echo $query;
$result = mysql_result($query, 0) == 1) ? true : false;
if($result === true)
{
$error = 'already have this data';
}
My code for checking already have data yet?, the problem is after run this code is the result always false, then I have try to echo $query and I got Resource id #11
How can I fix this problem?
mysql_queryreturn aresourceand also change the condition as
mysql_resultreturn false on failureso condition should be like this
if you want to fetch from resource link so call