comparison DBRecord.class.php @ 37:e5f9aa34d06f

change: modify all script for web base setting
author yoneda <epgrec@park.mda.or.jp>
date Tue, 28 Jul 2009 00:00:04 +0900
parents 01a8fdc0cebb
children 8965ef108821
comparison
equal deleted inserted replaced
36:c2522d1df005 37:e5f9aa34d06f
9 public $id; 9 public $id;
10 10
11 function __construct( $table, $property = null, $value = null ) { 11 function __construct( $table, $property = null, $value = null ) {
12 $settings = Settings::factory(); 12 $settings = Settings::factory();
13 13
14 $this->table = $table; 14 $this->table = $settings->tbl_prefix.$table;
15 15
16 $this->dbh = @mysql_connect( $settings->db_host , $settings->db_user, $settings->db_pass ); 16 $this->dbh = @mysql_connect( $settings->db_host , $settings->db_user, $settings->db_pass );
17 if( $this->dbh === FALSE ) throw new exception( "construct:データベースに接続できない" ); 17 if( $this->dbh === FALSE ) throw new exception( "construct:データベースに接続できない" );
18 18
19 $sqlstr = "use ".$settings->db_name; 19 $sqlstr = "use ".$settings->db_name;