in reply to Re: Re^3: Foreach Problem! Help!!!
in thread Foreach Problem! Help!!!
It is not the same thing to do this:
as it is to doSELECT * FROM foo WHERE expal = 5 ORDER BY expal; SELECT * FROM foo WHERE expal = 3 ORDER BY expal; SELECT * FROM foo WHERE expal = 2 ORDER BY expal; SELECT * FROM foo WHERE expal = 4 ORDER BY expal; SELECT * FROM foo WHERE expal = 1 ORDER BY expal;
Your code is effectively doing the former. You seem to want it to do the latter.SELECT * FROM foo WHERE expal IN (5,3,2,4,1) ORDER BY expal;
|
|---|