SELECT COUNT(*) FROM invitations WHERE inv_id='' AND stat='p':No database selected