cid || pid || name 1 || 1 || test1 1 || 2 || test2 1 || 3 || test3 2 || 1 || test4
itd.
UP[ Nie doczekam się

Nieważne, stack overflow pomógł.
http://stackoverflow.com/questions/1442065...by-other-column
cid || pid || name 1 || 1 || test1 1 || 2 || test2 1 || 3 || test3 2 || 1 || test4