Hello
I am debugging a php application.
In the Local Debugging window, it shows the following information
- Name value Type
- LinkID 15 mysql link
The value of LinkID change within the program
What is mysql link type , being shown in the debugging window?
Also, can anyone explain what the function performs ?
Here is the php code using LinkID:
function connect($new_link = false)
{
if (!$this->LinkID) {
$server = ($this->DBPort != "") ? $this->DBHost . ":" . $this->DBPort : $this->DBHost;
if ($this->DBPersistent) {
$this->LinkID = @mysql_pconnect($server, $this->DBUser, $this->DBPassword);
} else {
$this->LinkID = @mysql_connect($server, $this->DBUser, $this->DBPassword, $new_link);
}
if (!$this->LinkID) {
$this->halt("Connect failed: " . $this->describe_error(mysql_errno(), mysql_error()));
return 0;
}
if (!mysql_select_db($this->DBDatabase, $this->LinkID)) {
$this->LinkID = 0;
$this->halt($this->describe_error(mysql_errno(), mysql_error()));
return 0;
}
}
return $this->LinkID;
}