What's wrong with this:
function opendbconnection() {
global $true, $false;
$this->dbconnection = mysql_connect("$this->dbhost", "$this->dbuser", "$this->dbpassword");
if ($this->dbconnection == $true) {
$this->db = mysql_select_db("$this->db");
$this->setvar("dbconnection",$true);
} else {
$this->setvar("dbconnection",$false);
echo "[Error:] ".mysql_errno()." <b>".mysql_error()."</b>";
return false;
}
return true;
}
Because every time I try to run my application I get this: [Error:] 1046 No Database Selected
And why is that? WHY WHY WHY 🙂
I know I don't have alot to say here, but please take a look... the db is being selected right?
Thanks, Arni