Hello guys,
I had to change the host of my web page , now I'm having trouble accessing the page because of problems in the connection string with the base.
Error that occurs : Warning : mysql_select_db ( ) expects parameter 2 to be resource , null given in /var/www/web/Classes/AcessDatabase.php online 9
The selected database
Source AccessDatabase.php file:
<?php
class Acesso {
public function Conexao () {
$this->cnx= mysql_connect('AAAAAAAAAA','BBBBBBB','CCCCCCC') or print (mysql_error());
mysql_select_db('AAAAAAAAAA',$cnx);
public function ConexaoStoreProcedure () {
$this->cnxSP= mysql_connect('AAAAAAAAAA','BBBBBBB','CCCCCCC') or print (mysql_error());
mysql_select_db($this->cnxSP,'');
}
public function Query($sql){
$this->result=mysql_query($sql) or die (mysql_error());
}
public function StoreProcedure($SP,$cnxSP){
$this->resultSP=mysql_query($cnxSP,$SP) or die (mysql_error($this->cnxSP));
}
public function __destruct(){
@mysql_close($this->cnx);
}
}
?>