Dear Friends iam facing a problem in the pagination. It was working fine in my offline wamp server

when i moves it to the online it was showing Warning: mysql_real_escape_string() expects parameter 2 to be resource, integer given in /home/pps/public_html/news_and_events.php on line 10

Please help me I have gone through all other post in the but I didn't found any solutions for this. please any one can help me in this one of my another website is also showing the same issue I think may be this was happen because of the server php or Mysql upgrade

If any one can help me in this will be a greatfull. Iam not a professional coder So Iam an starter so please help me .If you can corret the code please add it in the reply