php - Only in few pages show the error Fatal Error: mysql_real_escape_string() -


this question has answer here:

i got error in pages, cannot identify why is,! please help. thnx.,

fatal error: mysql_real_escape_string(): access denied user 'flatsloo'@'localhost' (using password: no) fatal error: mysql_real_escape_string(): link server not established

my connection code

public function openconnection()     {         try         {             $this->_objmysql = mysql_connect($this->getdbconfig()->gethostname(), $this->getdbconfig()->getusername(), $this->getdbconfig()->getpassword());              if (mysql_errno())   // check if error occurred             {                 return mysql_error();             }              mysql_select_db($this->getdbconfig()->getdatabase());              if (mysql_errno())   // check if error occurred             {                 return mysql_error();             }              return true;         }         catch (exception $e)         {             return $e->getmessage();         }     } 

you have got errors database connection. failed connect database. check connection statement mysql_connect , parameters.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -