class sql_db
{
var $db_connect_id;
var $query_result;
var $row = array();
var $rowset = array();
var $num_queries = 0;
var $in_transaction = 0;
//
// Constructor
//
function sql_db($sqlserver, $sqluser, $sqlpassword, $database, $persistency = true)
{
$this->persistency = $persistency;
$this->user = $sqluser;
$this->password = $sqlpassword;
$this->server = $sqlserver;
$this->dbname = $database;
Can you guys please help me understand this function declaration
function sql_db($sqlserver, $sqluser, $sqlpassword, $database, $persistency = true)
$this->persistency = $persistency; // I believe this is refering to the variable declared in the function declaration, but where is the =$persistency coming from ?
Also, why is the assignment statement in the function declaration, why not inside the body ?
Thanks.