I've got a php script with this statement:
$query = "SELECT type
FROM users
WHERE username = '$username'";
$result = $database->query($query);
if($result == 1) {
echo "whatever";
continue;
}
The problem is that the if never runs and when I created a print statement to print $result before the if runs, it prints a Reference ID#. So result is never == 1 because it is being assigned the reference ID #.
What the heck am I doing wrong? How do I assign the value of 'type' which is an INT, instead of it's contents Reference ID#?
$databaseis it your own custom object, amysqliconnection, something else?