annotate epgrec_upgrade.php @ 77:cb7da56c4198

modified: Keyword.class.php modified: config.php.sample modified: index.php modified: install/step1.php modified: keywordTable.php modified: programTable.php modified: simpleReservation.php modified: templates/index.html modified: templates/keywordTable.html modified: templates/programTable.html
author Sushi-k <epgrec@park.mda.or.jp>
date Wed, 24 Feb 2010 20:22:19 +0900
parents e5f9aa34d06f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
20
9ab4184561d9 new file: epgrec_upgrade.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
1 #!/usr/bin/php
9ab4184561d9 new file: epgrec_upgrade.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
2 <?php
9ab4184561d9 new file: epgrec_upgrade.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
3 include_once('config.php');
37
e5f9aa34d06f change: modify all script for web base setting
yoneda <epgrec@park.mda.or.jp>
parents: 20
diff changeset
4 include_once(INSTALL_PATH . '/Settings.class.php' );
20
9ab4184561d9 new file: epgrec_upgrade.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
5
37
e5f9aa34d06f change: modify all script for web base setting
yoneda <epgrec@park.mda.or.jp>
parents: 20
diff changeset
6 $settings = Settings::factory();
e5f9aa34d06f change: modify all script for web base setting
yoneda <epgrec@park.mda.or.jp>
parents: 20
diff changeset
7
e5f9aa34d06f change: modify all script for web base setting
yoneda <epgrec@park.mda.or.jp>
parents: 20
diff changeset
8 $dbh = mysql_connect( $settings->db_host, $settings->db_user, $settings->db_pass );
20
9ab4184561d9 new file: epgrec_upgrade.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
9 if( $dbh !== false ) {
9ab4184561d9 new file: epgrec_upgrade.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
10
37
e5f9aa34d06f change: modify all script for web base setting
yoneda <epgrec@park.mda.or.jp>
parents: 20
diff changeset
11 $sqlstr = "use ".$settings->db_name;
20
9ab4184561d9 new file: epgrec_upgrade.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
12 mysql_query( $sqlstr );
9ab4184561d9 new file: epgrec_upgrade.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
13
9ab4184561d9 new file: epgrec_upgrade.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
14 $sqlstr = "set NAMES 'utf8'";
9ab4184561d9 new file: epgrec_upgrade.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
15 mysql_query( $sqlstr );
9ab4184561d9 new file: epgrec_upgrade.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
16
9ab4184561d9 new file: epgrec_upgrade.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
17 // RESERVE_TBL
9ab4184561d9 new file: epgrec_upgrade.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
18 // description -> text
37
e5f9aa34d06f change: modify all script for web base setting
yoneda <epgrec@park.mda.or.jp>
parents: 20
diff changeset
19 $sqlstr = "alter table ".RESERVE_TBL." modify description text default null;";
20
9ab4184561d9 new file: epgrec_upgrade.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
20 mysql_query( $sqlstr );
9ab4184561d9 new file: epgrec_upgrade.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
21 // path -> blob
37
e5f9aa34d06f change: modify all script for web base setting
yoneda <epgrec@park.mda.or.jp>
parents: 20
diff changeset
22 $sqlstr = "alter table ".RESERVE_TBL." modify path blob default null;";
20
9ab4184561d9 new file: epgrec_upgrade.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
23 mysql_query( $sqlstr );
9ab4184561d9 new file: epgrec_upgrade.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
24
9ab4184561d9 new file: epgrec_upgrade.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
25 // PROGRAM_TBL
9ab4184561d9 new file: epgrec_upgrade.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
26 // descripton -> text
37
e5f9aa34d06f change: modify all script for web base setting
yoneda <epgrec@park.mda.or.jp>
parents: 20
diff changeset
27 $sqlstr = "alter table ".PROGRAM_TBL." modify description text default null;";
20
9ab4184561d9 new file: epgrec_upgrade.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
28 mysql_query( $sqlstr );
9ab4184561d9 new file: epgrec_upgrade.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
29 }
9ab4184561d9 new file: epgrec_upgrade.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
30 else exit( "Can't connect DB\n");
9ab4184561d9 new file: epgrec_upgrade.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
31
9ab4184561d9 new file: epgrec_upgrade.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
32 ?>