why do i always get this message:Call to undefined function: getmessage()
here is my code:
$db=DB::connect($dsn);
if (DB::isError($db)){
return $db->getMessage();
}
$db->setFetchMode(DB_FETCHMODE_ASSOC);
$query = "SELECT FROM invites"; //i intentionally typed this incorrectly
$result = $db->getAll($query);
if (DB::isError($result)){
echo $db->getMessage();
echo "hello";
} else {
print_r($result);
}