The mayor and councilmen shall receive as compensation for their services the respective sums established by the council by ordinance at least six months prior to the date of their election.