replaced date w/ mysql query