No they're not all the same.
There's 80 wire cables and 40wire cables. Most cables these days are 80 wire, and should work OK - BUT I have met a few optical drives that seem to object.
So just get one the same as the one you've taken out (count the wires, not the pins - they're all the same!) - it'll be obvious.