24. januar 2004 - 17:36
Der er
3 kommentarer og
1 løsning
Hjælp til et dump?
Kan en af jer lave denne kode om til et dump jeg kan bruge i myphpadmin?
$sql=array(
'ALTER TABLE '.nuke_users.' ADD user_birthday INT DEFAULT "999999" not null ',
'ALTER TABLE '.nuke_users.' ADD user_next_birthday_greeting INT DEFAULT "0" not null ',
'INSERT INTO '.nuke_bbconfig.' (config_name, config_value) VALUES ("birthday_required", "0")',
'INSERT INTO '.nuke_bbconfig.' (config_name, config_value) VALUES ("birthday_greeting", "1")',
'INSERT INTO '.nuke_bbconfig.' (config_name, config_value) VALUES ("max_user_age", "55")',
'INSERT INTO '.nuke_bbconfig.' (config_name, config_value) VALUES ("min_user_age", "0")',
'INSERT INTO '.nuke_bbconfig.' (config_name, config_value) VALUES ("birthday_check_day", "7")'
);
24. januar 2004 - 20:52
#1
ALTER TABLE nuke_users ADD user_birthday INT DEFAULT "999999" not null;
ALTER TABLE nuke_users ADD user_next_birthday_greeting INT DEFAULT "0" not null;
INSERT INTO nuke_bbconfig (config_name, config_value) VALUES "birthday_required", "0");
osv..
nu kan jeg ikke lige se om dine tabeller hedder .nuke_bbconfig. eller nuke_bbconfig.. det kan du selv lige ændre.
24. januar 2004 - 20:57
#2
ups
INSERT INTO nuke_bbconfig (config_name, config_value) VALUES ("birthday_required", "0");
der er ikke så meget i det ..
arrayet indeholder bare en masse commands
så fjerner du
$sql=array();
så har du næsten de sætninger du skal bruge..
'.tabel.' skal så laves om til tabel
24. januar 2004 - 21:02
#3
kan du lave det komplet ? udfra dette ?
define('nuke', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'modules/Forums/extension.inc');
include($phpbb_root_path . 'modules/Forums/common.'.$phpEx);
include($phpbb_root_path . 'includes/functions_selects.'.$phpEx);
define('SITE_HISTORY_TABLE', $table_prefix.'site_history');
###################################################################################################
##
## put the SQL commands below here, the SQL commands listed below are only exampels, substitude them with the one you need ##
##
###################################################################################################
$sql=array(
//'ALTER TABLE '.nuke_users.' ADD user_birthday INT DEFAULT "999999" not null ',
//'ALTER TABLE '.nuke_users.' ADD user_next_birthday_greeting INT DEFAULT "0" not null ',
'INSERT INTO '.nuke_bbconfig.' (config_name, config_value) VALUES ("birthday_required", "0")',
'INSERT INTO '.nuke_bbconfig.' (config_name, config_value) VALUES ("birthday_greeting", "1")',
'INSERT INTO '.nuke_bbconfig.' (config_name, config_value) VALUES ("max_user_age", "55")',
'INSERT INTO '.nuke_bbconfig.' (config_name, config_value) VALUES ("min_user_age", "0")',
'INSERT INTO '.nuke_bbconfig.' (config_name, config_value) VALUES ("birthday_check_day", "7")'
);
$mods = array (
'Birthday PART 1 Mod','Birthday PART 1 Mod','Birthday PART 2 Mod','Birthday PART 2 Mod','Birthday PART 2 Mod','Birthday PART 2 Mod','Birthday PART 2 Mod',
);
############################################### Do not change anything below this line #######################################
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
if ($userdata['user_level']!=ADMIN)
message_die(GENERAL_ERROR, "You are not Authorised to do this");
$n=0;
$message="<b>This list is a result of the SQL queries needed for the additional mods in the pre-moded pack</b><br/><br/>";
while($sql[$n])
{
$message .= ($mods[$n-1] != $mods[$n]) ? '<p><b><font size=3>'.$mods[$n].'</font></b><br/>' : '';
if(!$result = $db->sql_query($sql[$n]))
$message .= '<b><font color=#FF0000>[Already added]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />';
else $message .='<b><font color=#0000fF>[Added/Updated]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />';
$n++;
}
message_die(GENERAL_MESSAGE, $message);
?>