思前想后

思前想后 (sī qián xiǎng hòu)
to consider past cause and future effect (idiom); to think over the past and future; to ponder over reasons and connection