Example #1
0
 /**
  * Conecta ao banco de dados
  *
  * @function dbConnect
  * @param $persistent false - normal, true - persistente
  * @return Boolean - True ou False
  */
 function dbConnect()
 {
     $ret = false;
     $this->conn = mysql_connect($this->dbHostname, $this->dbUsername, $this->dbPassword) or die(msqyl_error());
     if ($this->conn) {
         // seleciona a base de dados
         $this->conn = mysql_select_db($this->dbName, $this->conn);
         if ($this->conn) {
             $ret = true;
         }
     }
     return $ret;
 }
Example #2
0
<?
mysql_connect('localhost', 'istorrent', 'torrenter1') or die(msqyl_error());
mysql_select_db('istorrent') or die(msqyl_error());
mysql_query("select * from innmyndir") or die(mysqk_error());
?>