Changeset 43
- Timestamp:
- 04/06/08 19:24:27 (2 years ago)
- Files:
-
- 1 modified
-
trunk/class-mysqldb.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/class-mysqldb.php
r41 r43 7 7 * @subpackage MYSQL 8 8 * @since 2004-11-26 first version 9 * @changelog - 2008-04-06 - autoconnect is now a static property 9 10 * @changelog - 2008-03-20 - new static parameter (bool) $useNewLink used as mysql_connect new_link parameter 10 11 * (really usefull when working on different databases on the same host. 11 12 * you'd better set this to false as default if you don't need that feature.) 12 * - 2007-11-20 - changing call to vebose() method according to changed made in class-db13 * @changelog - 2007-11-20 - changing call to vebose() method according to changed made in class-db 13 14 * - 2007-03-28 - move last_q2a_res assignment from fetch_res() method to query_to_array() (seems more logical to me) 14 15 * - 2007-01-12 - now dump_to_file() use method escape_string instead of mysql_escape_string … … 30 31 * @see mysql_connect for more info 31 32 */ 32 static public $useNewLink = true;33 34 function mysqldb($dbname,$dbhost='localhost',$dbuser='root',$dbpass=''){ # most common config ?33 static public $useNewLink = false; 34 35 function __construct($dbname,$dbhost='localhost',$dbuser='root',$dbpass=''){ # most common config ? 35 36 $this->host = $dbhost; 36 37 $this->user = $dbuser; 37 38 $this->pass = $dbpass; 38 39 $this->dbname = $dbname; 39 $this->open(); 40 if(db::$autoconnect) 41 $this->open(); 40 42 } 41 43 … … 171 173 function query($Q_str){ 172 174 if(! $this->db ){ 173 if(! ( $this->autoconnect && $this->check_conn('check')))175 if(! (db::$autoconnect && $this->check_conn('check'))) 174 176 return FALSE; 175 177 } … … 339 341 } 340 342 } 341 ?>
