名前が存在するかどうかを確認しようとしています。フィールドが空であるため、クエリは0を返す必要がありますが、代わりに1を返します。ヘルプ。
function profile_exists($user) { //checks that profile exists
$profile_ex = mysql_query(
"SELECT COUNT(profile_name) FROM user_info WHERE id = '{$user}'");
if(!confirm_query($profile_ex)) {
return false;
} else {
if (mysql_result($profile_ex, 0) == 1) {
echo mysql_result($profile_ex, 0);
exit;
return true;
} else {
return false;
}
}
}