Seite 1 von 1
Database datei ..wer ist so nett???
Verfasst: 25.08.2003 16:57
von saddel
wer kann mir diese zeilen als update datei zurechtbasteln?
ich krieg den myphpadmin kram nicht richtig hin...
1.------------diese Datei----------------------------
#
#-----[ SQL ]----------------------------------------
#
ALTER TABLE phpbb_categories ADD cat_main MEDIUMINT(8) UNSIGNED DEFAULT '0' NOT NULL;
ALTER TABLE phpbb_categories ADD cat_desc TEXT NOT NULL;
vielleicht hat ja jemand kurz zeit und bock mir kurz zu erklären ,wie man grundsätzlich bei php myadmin vorgeht...thanx...
Verfasst: 25.08.2003 17:12
von Leuchte
Code: Alles auswählen
<?php
/***************************************************************************
* db_update.php
* -------------------
*
* copyright : ©2003 Freakin' Booty ;-P & Antony Bailey
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
if( !$userdata['session_logged_in'] )
{
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
header($header_location . append_sid("login.$phpEx?redirect=db_update.$phpEx", true));
exit;
}
if( $userdata['user_level'] != ADMIN )
{
message_die(GENERAL_MESSAGE, 'You are not authorised to access this page');
}
$page_title = 'Updating the database';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
echo '<table width="100%" cellspacing="1" cellpadding="2" border="0" class="forumline">';
echo '<tr><th>Updating the database</th></tr><tr><td><span class="genmed"><ul type="circle">';
$sql = array();
$sql[] = "ALTER TABLE " . $table_prefix . "categories ADD cat_main MEDIUMINT(8) UNSIGNED DEFAULT '0' NOT NULL";
$sql[] = "ALTER TABLE " . $table_prefix . "categories ADD cat_desc TEXT NOT NULL";
for( $i = 0; $i < count($sql); $i++ )
{
if( !$result = $db->sql_query ($sql[$i]) )
{
$error = $db->sql_error();
echo '<li>' . $sql[$i] . '<br /> +++ <font color="#FF0000"><b>Error:</b></font> ' . $error['message'] . '</li><br />';
}
else
{
echo '<li>' . $sql[$i] . '<br /> +++ <font color="#00AA00"><b>Successfull</b></font></li><br />';
}
}
echo '</ul></span></td></tr><tr><td class="catBottom" height="28"> </td></tr>';
echo '<tr><th>End</th></tr><tr><td><span class="genmed">Installation is now finished. Please be sure to delete this file now.<br />If you have run into any errors, please visit the <a href="http://www.phpbbhacks.com/forums" target="_phpbbhacks">phpBBHacks.com support forums</a> and ask someone for help.</span></td></tr>';
echo '<tr><td class="catBottom" height="28" align="center"><span class="genmed"><a href="' . append_sid("index.$phpEx") . '">Have a nice day</a></span></td></table>';
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
ansonsten: phpmyadmin öffnen: links deine datenbank auswählen.. im rechten frame stehen dann alle tabellen und oben steht gross SQL.
da klickst du drauf und in das kleine fenster gibst du diesen ALTER teil ein und OK

Verfasst: 25.08.2003 17:14
von saddel
Verfasst: 25.08.2003 17:32
von Henne