I am attempting to create a cookie with the return string of this query:
$id = $database -> query("SELECT id FROM accounts WHERE username = '$username' AND password = '$password'");
However, it is returning an object rather than a string. I am trying to return the "id" of the row. How do I do this?