|
Autor |
Nachricht |
Wicher
|
Titel: (Kein Titel)
Verfasst am: Di, 28 Feb 2006, 14:48 |
|
|
Hello,
i am getting a sql error after installing Statusmail, latest version.
Code: |
Could not insert data into 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 '0, 'b67e5de74f43154')' at line 2
INSERT INTO phpbb_users (user_id, user_registerip, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_detector, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_viewquickreply, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_autospell, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey, user_initial, user_wantcolom, statusmail_days, statusmail_last, statusmail_viewchars) VALUES (364, '51113d76', 'tele2', 1141130601, '454fa3618f3db20f01c3f2ec5d95e800', 'modforum@detecties.com', '', '', '', '', '', '', '', '', '', 0, 0, 2, '', '', '', 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 'D M d, Y g:i a', 'dutch', 3, 0, 1, 1, 1, '30', '1141130601', '0'0, 'b67e5de74f43154')
Line : 738
File : usercp_register.php
|
here is my sql query:
Code: |
$sql = "INSERT INTO " . USERS_TABLE . " (user_id, user_registerip, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_detector, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_viewquickreply, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_autospell, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey, user_initial, user_wantcolom, statusmail_days, statusmail_last, statusmail_viewchars)
VALUES ($user_id, '" . str_replace("\'", "''", $user_registerip) . "', '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $location) . "', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $detector) . "', '" . str_replace("\'", "''", $signature) . "', '$signature_bbcode_uid', $avatar_sql, $viewemail, $viewquickreply, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $spellcheck, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $popup_pm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, 0, 1, $postinitial, $userwantcolom, '$statusmail_days', ".time().", '".$board_config['statusmail_viewchars']."'";
|
i seems that it puts an strange ' between two 0 that causes the error.
How to change it so that it gives no error anymore?
This is very anoiing error, because nobody is able to register at my board anymore after installing Statusmail.
|
|
Nach oben |
|
boris
Beiträge: 11193
|
Titel: (Kein Titel)
Verfasst am: Di, 28 Feb 2006, 14:56 |
|
|
Wicher @ Di, 28 Feb 2006, 13:48 gab folgendes von sich: |
i seems that it puts an strange ' between two 0 that causes the error. |
"it" is "you" in this case ...
you skipped a comma while installing StatusMail (I double-checked it and the MOD-file is ok !), replace
with
and you should be just fine ...
EDIT:
there's something more about the query which is not correct: after the last column (which is statusmail_viewchars with the value '0'), there's more data to put into the table without naming the columns ("0, 'b67e5de74f43154'") - you should check wherever that comes from and if you made more mistakes while installing StatusMail (or another MOD) !
____________ beehave - home of humbug ... [we can't afford to be neutral]
Zuletzt bearbeitet von boris am Di, 28 Feb 2006, 15:02, insgesamt einmal bearbeitet. (1 Prozent)
|
|
Nach oben |
|
Wicher
|
Titel: (Kein Titel)
Verfasst am: Di, 28 Feb 2006, 15:01 |
|
|
Thanks for you rapid answer.
Working oke now.
|
|
Nach oben |
|
boris
Beiträge: 11193
|
Titel: (Kein Titel)
Verfasst am: Di, 28 Feb 2006, 15:03 |
|
|
all right ... then my "EDIT" was obsolete cause the code was mixed up just because of that comma ...
____________ beehave - home of humbug ... [we can't afford to be neutral]
|
|
Nach oben |
|
Wicher
|
Titel: (Kein Titel)
Verfasst am: Di, 28 Feb 2006, 15:21 |
|
|
That other data was from the activition codes that phpbb adds to the query.
so the 0'0 became 0, '0 after putting back that stupid comma.
|
|
Nach oben |
|
Wicher
|
Titel: (Kein Titel)
Verfasst am: Di, 28 Feb 2006, 15:26 |
|
|
Now i think a little bit further, i know now why phpbb always said that the activationcode was wrong when a new user registered and wanted to activate.
i placed other items behind , user_actkey stupid me...
|
|
Nach oben |
|
boris
Beiträge: 11193
|
Titel: (Kein Titel)
Verfasst am: Di, 28 Feb 2006, 16:03 |
|
|
Wicher @ Di, 28 Feb 2006, 14:26 gab folgendes von sich: |
i placed other items behind , user_actkey stupid me... |
That's what I meant above: the order of the data didn't correspond to the order of the table columns ...
____________ beehave - home of humbug ... [we can't afford to be neutral]
|
|
Nach oben |
|
Wicher
|
Titel: (Kein Titel)
Verfasst am: Di, 28 Feb 2006, 16:06 |
|
|
boris @ Tue, 28 Feb 2006, 15:03 gab folgendes von sich: |
Wicher @ Di, 28 Feb 2006, 14:26 gab folgendes von sich: |
i placed other items behind , user_actkey stupid me... |
That's what I meant above: the order of the data didn't correspond to the order of the table columns ... |
Thanks the install of Statusmail i found out about it.
Super mod btw, Statusmail.
Thanks for creating it.
|
|
Nach oben |
|
|
|
ähnliche Beiträge |
|
Thema
| Autor
| Forum
| Antworten
| Verfasst am
|
|
StatusMail hat keinen Inhalt, nur einen komischen An... |
staszek.g |
mod support |
5 |
Di, 11 Dez 2007, 12:16 |
|
Anpassungs- und Ergänzungsvorschläge für StatusMail |
staszek.g |
mod support |
1 |
Do, 29 Nov 2007, 20:16 |
|
Bugfix StatusMail |
boris |
mod support |
0 |
So, 04 Nov 2007, 11:08 |
|
StatusMail und Unterforen |
Moskito |
mod support |
3 |
Fr, 19 Okt 2007, 00:53 |
|
Frage zu Statusmail |
DJSonic |
mod support |
5 |
Fr, 14 Sep 2007, 12:42 |
Schreiben: nein. Antworten: nein. Bearbeiten: nein. Löschen: nein. Umfragen: nein.
|