fixing sql bug which is about 'between' and making ajax request for percentage calculations at the content detail of issue