When i browse my website, evrything works fine. The website connects with database and displays results. However, i get this error whenever it encounters mysql_resl_escape_string
:
mysql_real_escape_string() [function.mysql-real-escape-string]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in......
Please note that the website runs fine as soon as i remove the mysql_real_escape_string code from every page. But, this is not justified. What is the fix for this thing?