[PROBLEM] DB <--

Makes it posble for admin to specify witch type of users may mass PM any usergroup
Also PM users can be a list of usernames, so PM can be sendt to any number of users

Moderator: Moderators

Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

[PROBLEM] DB <--

Postby zoR on Tue 30. Sep, 2003 19:56

After i tried the profile updating everything worked but after the registering.. :

Could not insert data into users table

DEBUG MODE

SQL Error : 1136 Column count doesn't match value count at row 1

INSERT INTO phpbb_users (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_allow_mass_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_gender, user_level, user_allow_pm, user_birthday, user_next_birthday_greeting, user_active, user_actkey) VALUES (25, 'dsa', 1064944436, '202cb962ac59075b964b07152d234b70', 'blah@blah.com', '', '', '', '', '', '', '', '', 0, 0, '', '', '', 1, 1, 0, 1, 1, 0, 1, user_allow_mass_pm = 2, 1, 2, 'D M d, Y g:i a', 'english', 1, 0, 1, 0, 'e1f26f')

Line : 605


thats what i've got in INSERT TABLE line..

$sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_allow_mass_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_gender, user_level, user_allow_pm, user_birthday, user_next_birthday_greeting, user_active, user_actkey)
VALUES ($user_id, '" . 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("\'", "''", $signature) . "', '$signature_bbcode_uid', $avatar_sql, $viewemail, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, user_allow_mass_pm = $allow_mass_pm, $popup_pm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, 0, 1, ";


why is it happening?
zoR
Poster
Poster
 
Posts: 10
Joined: Sun 21. Sep, 2003 20:03

Postby Niels on Wed 01. Oct, 2003 16:54

this, is not correct
Code: Select all
user_allow_mass_pm = $allow_mass_pm


it is inserted a wrong spot, please see the how-to, it should be placd in another line of code
(if a how-to is EM ready, it will mostly be bullet prof, since a machine is more picky than a human. :D)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby duvelske on Tue 09. Dec, 2003 15:32

Niels wrote:this, is not correct
Code: Select all
user_allow_mass_pm = $allow_mass_pm


it is inserted a wrong spot, please see the how-to, it should be placd in another line of code


Do you know how that works? Or must i make a db_update.php file?
Greetzzz,
Image
duvelske
Poster
Poster
 
Posts: 194
Joined: Sat 16. Aug, 2003 17:31

Postby Niels on Wed 10. Dec, 2003 15:13

You haven't done this correctly
Code: Select all
#
#-----[ FIND ]------------------------------------------------
#
$sql = "UPDATE " . USERS_TABLE . "
SET

#
#-----[ IN-LINE FIND ]----------------------------------------
#
$notifypm

#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
, user_allow_mass_pm = $allow_mass_pm

#
#-----[ FIND ]------------------------------------------------
#
$sql = "INSERT INTO " . USERS_TABLE
VALUES (

#
#-----[ IN-LINE FIND ]----------------------------------------
#
user_notify_pm

#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
, user_allow_mass_pm

#
#-----[ IN-LINE FIND ]----------------------------------------
#
$notifypm

#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
, $allow_mass_pm
(if a how-to is EM ready, it will mostly be bullet prof, since a machine is more picky than a human. :D)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46


Return to Custom mass PM [2.0.6/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron