No database selected

SELECT `ActionID`, `DocumentStateID` FROM `Action`, `DocumentState` WHERE `ActionName` = 'View' AND `DocumentStateName` = 'Publish'