With the realization below, I'm starting to wonder if it would be much clearer if the param was called "$draftVersionNo =null". Where null would mean published version. This would avoid the whole issue with joining the two tables and id conflicts as well right?