Zeile 6 | Zeile 6 |
---|
* Website: http://www.mybboard.com * License: http://www.mybboard.com/eula.html *
|
* Website: http://www.mybboard.com * License: http://www.mybboard.com/eula.html *
|
* $Id: db_mysql.php 2163 2006-08-30 05:53:05Z chris $
| * $Id: db_mysql.php 2743 2007-02-09 00:05:26Z CraKteR $
|
*/
class databaseEngine
| */
class databaseEngine
|
Zeile 83 | Zeile 83 |
---|
* @param boolean 1 if persistent connection, 0 if not. * @return resource The database connection resource. */
|
* @param boolean 1 if persistent connection, 0 if not. * @return resource The database connection resource. */
|
function connect($hostname="localhost", $username="root", $password="", $pconnect=0)
| function connect($hostname="localhost", $username="root", $password="", $pconnect=0, $newlink=false)
|
{ if($pconnect) {
| { if($pconnect) {
|
Zeile 91 | Zeile 91 |
---|
} else {
|
} else {
|
$this->link = @mysql_connect($hostname, $username, $password) or $this->dberror();
| $this->link = @mysql_connect($hostname, $username, $password, $newlink) or $this->dberror();
|
} return $this->link; }
| } return $this->link; }
|
Zeile 288 | Zeile 288 |
---|
*/ function errno() {
|
*/ function errno() {
|
return mysql_errno($this->link);
| if($this->link) { return mysql_errno($this->link); } else { return mysql_errno(); }
|
}
/**
| }
/**
|
Zeile 298 | Zeile 305 |
---|
*/ function error() {
|
*/ function error() {
|
return mysql_error($this->link);
| if($this->link) { return mysql_error($this->link); } else { return mysql_error(); }
|
}
/**
| }
/**
|
Zeile 310 | Zeile 324 |
---|
{ if($this->error_reporting) {
|
{ if($this->error_reporting) {
|
echo "MySQL error: " . mysql_errno($this->link); echo "<br />" . mysql_error($this->link);
| echo "MySQL error: " . $this->errno(); echo "<br />" . $this->error();
|
echo "<br />Query: $string"; exit; }
| echo "<br />Query: $string"; exit; }
|
Zeile 393 | Zeile 407 |
---|
*/ function field_exists($field, $table) {
|
*/ function field_exists($field, $table) {
|
global $db;
| |
$err = $this->error_reporting; $this->error_reporting = 0; $query = $this->query("
| $err = $this->error_reporting; $this->error_reporting = 0; $query = $this->query("
|