From 167c3e4c1b55f62d49fba98da3464e9a51e66ddf Mon Sep 17 00:00:00 2001 From: saxmatt Date: Wed, 4 Jun 2003 19:55:21 +0000 Subject: [PATCH] Altered with new database fields. git-svn-id: http://svn.automattic.com/wordpress/trunk@164 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/b2-2-wp.php | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/wp-admin/b2-2-wp.php b/wp-admin/b2-2-wp.php index df5b238d36..b37cb779a1 100644 --- a/wp-admin/b2-2-wp.php +++ b/wp-admin/b2-2-wp.php @@ -1,20 +1,6 @@ $msg

"; - echo "

query:
$sql

"; - echo "

error:
$error

"; - die(); -} - -$connexion = mysql_connect($server, $loginsql, $passsql) or die("Can't connect to the database
".mysql_error()); -$dbconnexion = mysql_select_db($base, $connexion); - -if (!$dbconnexion) { - echo mysql_error(); - die(); -} $step = $HTTP_GET_VARS['step']; if (!$step) $step = 0; if (!step) $step = 0; @@ -209,12 +195,16 @@ if ($got_row) { case 2: ?>

Step 2

-

First we’re going to add excerpt functionality...

+

First we’re going to add excerpt, post, and password functionality...

query($query); +$query = "ALTER TABLE $tableposts ADD `comment_status` ENUM('open','closed') NOT NULL, +ADD `ping_status` ENUM('open','closed') NOT NULL, +ADD post_password varchar(20) NOT NULL;"; +$q = $wpdb->query($query); ?>

That went well! Now let's clean up the b2 database structure a bit...

@@ -222,7 +212,7 @@ $q = mysql_query($query) or mysql_doh("Doh, add excerpts.", $query, mysql_error( query($query); ?>

One down, two to go...

@@ -230,7 +220,15 @@ $q = mysql_query($query) or mysql_doh("Can't drop the ID index. Did you already query($query); + +?> + +

So far so good.

+query($query); ?> @@ -240,7 +238,7 @@ $q = mysql_query($query) or mysql_doh("Can't drop ID from the settings table. Do $query = "ALTER TABLE $tableusers DROP INDEX `ID`"; -$q = mysql_query($query) or mysql_doh("Couldn't drop index from users table.", $query, mysql_error()); +$q = $wpdb->query($query); ?>