Seite 1 von 2

Fehlermeldung nach MOD-Anbau bzw. Profiländerung

Verfasst: 21.04.2007 17:42
von yampi
Hallo!

Erst habe ich einen Mod "Show First Post on Every Page" eingebaut!
Denn ich wollte nur, dass neue Beiträge immer oben angezeigt werden.
Das hat nicht funktioniert!
Bei der Profile ist eine Fehlermeldung aufgetaucht und steht:

Code: Alles auswählen

Could not update users table

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' user_allowsmile = 1, user_allowhtml = 1, user_allowbbcode = 1, user_allow_viewo' at line 2

UPDATE phpbb_users SET user_email = 'xxx@xxx.de', user_icq = '', user_website = '', user_occ = '', user_from = '', user_interests = '', user_sig = 'Jetzt reicht''s!', user_sig_bbcode_uid = '32ec442a74', user_viewemail = 0, user_aim = '', user_yim = '', user_msnm = '', user_attachsig = 0, user_allowfirstmsg = , user_allowsmile = 1, user_allowhtml = 1, user_allowbbcode = 1, user_allow_viewonline = 1, user_notify = 0, user_notify_pm = 0, user_popup_pm = , user_timezone = 0, user_dateformat = 'd.m.Y H:i', user_lang = 'german', user_style = 2, user_active = 1, user_actkey = '' WHERE user_id = 3

Line : 531
File : usercp_register.php
Hier: user_register.php

Für baldige Antworten bzw. irgendeine Lösung wäre ich Dir dankbar! :oops:

Gruß Yampi.

Verfasst: 21.04.2007 17:45
von Miriam

Code: Alles auswählen

user_allowfirstmsg =
dahinter fehlt die Variable bzw. Schau nochmal in Deine Mod Einbauanleitung.

Verfasst: 21.04.2007 18:02
von yampi
Wo steht es genau drin?

Eine MOD-Anleitung, hier: Show First Post on Every Page (nur zu usercp_register.php)

Verfasst: 21.04.2007 18:29
von Miriam
Da gab's doch bestimmt einen SQL Query dazu... *gell* Oder wo kommt die Spalte

Code: Alles auswählen

user_allowfirstmsg
in der Usertabelle her?

Verfasst: 21.04.2007 19:46
von yampi

Code: Alles auswählen

user_allowfirstmsg
steht nicht in der Usertabelle (SQL)! Was denn nun? :-?

Verfasst: 21.04.2007 19:58
von Miriam
Keine Ahnung, was der Mod dazu sagt. Aber wenn die Spalte nicht da ist, kann auch kein Wert ausgelesen oder eingefügt werden.
Du musst doch auch irgendwo die Werte-Parameter für diese Spalte ändern können, sonst wäre das alles ja irgendwie sinnfrei.

Verfasst: 21.04.2007 20:39
von yampi
Habe eine PHP-Datei "frstmsgdbupate.php" (s.u.) auf dem Server geworfen und nun ist's
geschehen, dass user_allowfirstmsg doch in der Usertabelle steht! Sorry,
dass ich vorher nicht gedacht habe, aber ich habe immer wieder
nachgedacht, wozu eine Datei doch dabei sein muss.

Code: Alles auswählen

<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

$sql = "ALTER TABLE " . USERS_TABLE . " ADD user_allowfirstmsg TINYINT(1) NOT NULL";

if( !($result = $db->sql_query($sql)) )
{
	message_die(GENERAL_ERROR, 'Could not add column <b>user_allowfirstmsg</b> into <b>'. USERS_TABLE .'</b>.<br>The hack cannot be installed without this entry into the database.', '', __LINE__, __FILE__, $sql);
}
else
{
	message_die(GENERAL_MESSAGE, 'Successfully added <b>user_allowfirstmsg</b> to table <b>'. USERS_TABLE .'</b>.<br>Delete this file and begin installing the rest of the hack by following the intructions.', 'Information');
}
$db->close_db();
?>
Wie die Ergebnis aussieht, ist es auch wieder erfolglos:

Code: Alles auswählen

Could not add column user_allowfirstmsg into phpbb_users.
The hack cannot be installed without this entry into the database.

DEBUG MODE

SQL Error : 1060 Duplicate column name 'user_allowfirstmsg'

ALTER TABLE phpbb_users ADD user_allowfirstmsg TINYINT(1) NOT NULL

Line : 11
File : frstmsgdbupate.php

Verfasst: 21.04.2007 20:53
von Miriam
Na einmal geht nur... zweimal der selbe Name für ein Spalte in der selben Tabelle sind nicht möglich.

Hast Du die Datei zweimal aufgerufen?

Verfasst: 21.04.2007 21:08
von yampi
Ja, das habe ich zweimal aufgerufen. Das war ja meine Fehler!

Die Zeile "user_allowfirstmsg" aus der Usertabelle (SQL) habe ich gelöscht.
Die Datei "frstmsgdbupate.php" habe ich dann nur einmal aufgerufen.
Nun klappte es doch. Diese Datei habe ich aus dem Server gelöscht und
sehe mir dann in der Profil nach, dass es jedoch nicht funktioniert! Wieder
eine Fehlermeldung, siehe wie ganz oben!

Verfasst: 21.04.2007 21:52
von Miriam
...ist nun die Spalte da oder nicht? :o