Mercurial > epgrec.yaz
comparison upgrade_db.php @ 137:a18df712fc7e
merged with upstream
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Sun, 21 Mar 2010 03:15:00 +0900 |
parents | 9c5e597ef6c6 |
children | 481e789605e3 |
comparison
equal
deleted
inserted
replaced
119:b172a0b1ea48 | 137:a18df712fc7e |
---|---|
2 <?php | 2 <?php |
3 $script_path = dirname( __FILE__ ); | 3 $script_path = dirname( __FILE__ ); |
4 chdir( $script_path ); | 4 chdir( $script_path ); |
5 include_once($script_path . '/config.php'); | 5 include_once($script_path . '/config.php'); |
6 include_once(INSTALL_PATH . '/Settings.class.php' ); | 6 include_once(INSTALL_PATH . '/Settings.class.php' ); |
7 | 7 include_once(INSTALL_PATH . '/DBRecord.class.php' ); |
8 include_once(INSTALL_PATH . '/tableStruct.inc.php' ); | |
8 | 9 |
9 // mysqli::multi_queryは動作がいまいちなので使わない | 10 // mysqli::multi_queryは動作がいまいちなので使わない |
10 | 11 |
11 function multi_query( $sqlstrs, $dbh ) { | 12 function multi_query( $sqlstrs, $dbh ) { |
12 $error = false; | 13 $error = false; |
191 } | 192 } |
192 | 193 |
193 if( multi_query( $sqlstrs, $dbh ) ) { | 194 if( multi_query( $sqlstrs, $dbh ) ) { |
194 echo "キーワードテーブルのアップデートに失敗\n"; | 195 echo "キーワードテーブルのアップデートに失敗\n"; |
195 } | 196 } |
197 | |
198 // ログテーブル | |
199 | |
200 try { | |
201 $log = new DBRecord( LOG_TBL ); | |
202 $log->createTable( LOG_STRUCT ); | |
203 } | |
204 catch( Exception $e ) { | |
205 echo $e->message; | |
206 echo "\n"; | |
207 } | |
208 | |
196 } | 209 } |
197 else | 210 else |
198 exit( "DBの接続に失敗\n" ); | 211 exit( "DBの接続に失敗\n" ); |
199 ?> | 212 ?> |