Judging from the way you wrote the spawn command above "item woodplank id ___" you are using it the wrong way around and thus as expected always get texture number 21. You should use it as Avanar wrote above "item woodplank ___ id" where the gap is the number you want.
Now about the rotation if you switch to local using the "rotation local" command it will probably be much easier for you to rotate thing around the way you want. When using legacy rotation (i.e. the default mode) you need to be careful which direction you rotate towards from as it takes into account 6 axes (global and local ones) and not just 3 (local ones).