That querySingle(...) method is returning a 'mixed' type. $EntryExistsBoolean then has a type that depends dynamically (meaning at runtime) on what came back from the call. So what type is it? And what is its value? From reviewing this thread, it appears that your problem boils down to converting $EntryExistsBoolean from whatever it is to an honest boolean. Let's see what has to be converted. And a kindly intended word of advice: A response such as > Already tried. No difference does not help anybody's thinking to progress on this. What happened? (In detail, rather than "It did not work.") When you make it look like you are unwilling to help unpaid volunteers to help you, they are likely to find better uses for their charitable efforts. Use whatever PHP's type revealing mechanism is to see what you've got. Use a print to a log file if that's what it takes. Without more data, more conjecture as to what is happening is futile.