Recently, it was shown that a binary linear code can be associated to a binomial ideal given as the sum of a toric ideal and a non-prime ideal. Since then two different generalizations have been provided which coincide for the binary case. In this paper, we establish some connections between the two approaches. In particular, we show that the corresponding code ideals are related by elimination. Finally, a new heuristic decoding method for linear codes over prime fields is discussed using Gr\"obner bases.