CurtisH
Life Cycles Becoming CPU Cycles

Joined: Mar 15, 2004
Posts: 638
Location: West Branch, MI
|
Posted:
Tue Oct 12, 2004 11:24 am |
|
Could someone please offer me assistance? I am trying to set up my Platinum Nuke site to use the forum registration instead of the Nuke registration but whenever you try to register via the forum registration you get the following:
Code:
Could not insert data into users table
DEBUG MODE
SQL Error : 1136 Column count doesn't match value count at row 1
INSERT INTO nuke_users (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_website2, user_website3, user_occ, user_from, user_from_flag, user_from_state_flag, user_interests, user_interests2, user_profile_view_popup, 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_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 (219, 'testuser', 'Oct 12, 2004', '5a105e8b9d40e1329780d62ea2265d8a', 'testuser@testmail.com', '123456789', 'http://test1.com', 'Tester', 'Texas', 'usa.gif', 'texas.gif', 'Testing', 'Test Music', 0, '', 0, 0, 'test1', 'test1', 'test1', 1, 1, 1, 1, 1, 0, 1, 1, -6, 'D M d, Y g:i a', 'english', 1, '1', 1, 1, '-365', '2005', 1, '')
Line : 845
File : /home/clhanc1/public_html/includes/usercp_register.php
|
I cannot seem to find what I am doin wrong, or should I say what I have left out. Could someone please point out what needs to be done to correct the error and allow forum registration to work?
Here is the Insert from usercp_register.php:
Code:
$sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_website2, user_website3, user_occ, user_from, user_from_flag, user_from_state_flag, user_interests, user_interests2, user_profile_view_popup, 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_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) . "', '" . $reg_date . "', '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $location) . "', '$user_flag', '$user_state_flag', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $interests2) . "', $profile_view_popup, $avatar_sql, $viewemail, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $popup_pm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, '$gender', 1, 1, '$birthday', '$next_birthday_greeting', ";
if ( $board_config['require_activation'] == USER_ACTIVATION_SELF || $board_config['require_activation'] == USER_ACTIVATION_ADMIN || $coppa )
{
$user_actkey = gen_rand_string(true);
$key_len = 54 - (strlen($server_url));
$key_len = ( $key_len > 6 ) ? $key_len : 6;
$user_actkey = substr($user_actkey, 0, $key_len);
$sql .= "0, '" . str_replace("\'", "''", $user_actkey) . "')";
}
else
{
$sql .= "1, '')";
}
if ( !($result = $db->sql_query($sql, BEGIN_TRANSACTION)) )
{
message_die(GENERAL_ERROR, 'Could not insert data into users table', '', __LINE__, __FILE__, $sql);
}
|
Here is the structure for my nuke_users table:
Code:
-- Table structure for table `nuke_users`
--
CREATE TABLE `nuke_users` (
`user_id` int(11) NOT NULL auto_increment,
`name` varchar(60) NOT NULL default '',
`username` varchar(25) NOT NULL default '',
`user_email` varchar(255) NOT NULL default '',
`femail` varchar(255) NOT NULL default '',
`user_website` varchar(255) NOT NULL default '',
`user_avatar` varchar(255) NOT NULL default '',
`user_regdate` varchar(20) NOT NULL default '',
`user_icq` varchar(15) default NULL,
`user_occ` varchar(100) default NULL,
`user_from` varchar(100) default NULL,
`user_from_flag` varchar(25) default NULL,
`user_from_state_flag` varchar(25) default NULL,
`user_interests` varchar(150) NOT NULL default '',
`user_sig` varchar(255) default NULL,
`user_viewemail` tinyint(2) default NULL,
`user_profile_view_popup` tinyint(1) default '1',
`user_theme` int(3) default NULL,
`user_aim` varchar(18) default NULL,
`user_yim` varchar(25) default NULL,
`user_msnm` varchar(25) default NULL,
`user_password` varchar(40) NOT NULL default '',
`storynum` tinyint(4) NOT NULL default '10',
`umode` varchar(10) NOT NULL default '',
`uorder` tinyint(1) NOT NULL default '0',
`thold` tinyint(1) NOT NULL default '0',
`noscore` tinyint(1) NOT NULL default '0',
`bio` tinytext NOT NULL,
`ublockon` tinyint(1) NOT NULL default '0',
`ublock` tinytext NOT NULL,
`theme` varchar(255) NOT NULL default '',
`commentmax` int(11) NOT NULL default '4096',
`counter` int(11) NOT NULL default '0',
`newsletter` int(1) NOT NULL default '0',
`user_posts` int(10) NOT NULL default '0',
`user_attachsig` int(2) NOT NULL default '0',
`user_rank` int(10) NOT NULL default '0',
`user_level` int(10) NOT NULL default '1',
`broadcast` tinyint(1) NOT NULL default '1',
`popmeson` tinyint(1) NOT NULL default '0',
`user_active` tinyint(1) default '1',
`user_session_time` int(11) NOT NULL default '0',
`user_session_page` smallint(5) NOT NULL default '0',
`user_lastvisit` int(11) NOT NULL default '0',
`user_timezone` tinyint(4) NOT NULL default '10',
`user_style` tinyint(4) default NULL,
`user_lang` varchar(255) NOT NULL default 'english',
`user_dateformat` varchar(14) NOT NULL default 'D M d, Y g:i a',
`user_new_privmsg` smallint(5) unsigned NOT NULL default '0',
`user_unread_privmsg` smallint(5) unsigned NOT NULL default '0',
`user_last_privmsg` int(11) NOT NULL default '0',
`user_emailtime` int(11) default NULL,
`user_allowhtml` tinyint(1) default '1',
`user_allowbbcode` tinyint(1) default '1',
`user_allowsmile` tinyint(1) default '1',
`user_allowavatar` tinyint(1) NOT NULL default '1',
`user_allow_pm` tinyint(1) NOT NULL default '1',
`user_allow_viewonline` tinyint(1) NOT NULL default '1',
`user_notify` tinyint(1) NOT NULL default '0',
`user_notify_pm` tinyint(1) NOT NULL default '0',
`user_notify_donation` tinyint(1) NOT NULL default '0',
`user_popup_pm` tinyint(1) NOT NULL default '0',
`user_avatar_type` tinyint(4) NOT NULL default '3',
`user_sig_bbcode_uid` varchar(10) default NULL,
`user_actkey` varchar(32) default NULL,
`user_newpasswd` varchar(32) default NULL,
`points` int(10) default '0',
`user_group_cp` int(11) NOT NULL default '2',
`user_group_list_cp` varchar(100) NOT NULL default '2',
`user_active_cp` enum('YES','NO') NOT NULL default 'YES',
`user_insult` varchar(100) NOT NULL default '',
`user_gender` tinyint(4) NOT NULL default '0',
`user_points` int(11) NOT NULL default '0',
`admin_allow_points` tinyint(1) NOT NULL default '1',
`user_items` text,
`user_effects` varchar(255) default NULL,
`user_privs` varchar(255) default NULL,
`user_custitle` text,
`user_specmsg` text,
`user_married` int(1) NOT NULL default '0',
`user_children` int(1) NOT NULL default '0',
`user_child` int(1) NOT NULL default '0',
`user_birthday` int(11) default '999999',
`user_next_birthday_greeting` int(11) default '0',
`user_profile_view` smallint(5) unsigned NOT NULL default '0',
`user_last_profile_view` int(11) NOT NULL default '0',
`user_cell_time` int(11) NOT NULL default '0',
`user_cell_time_judgement` int(11) NOT NULL default '0',
`user_cell_caution` int(8) NOT NULL default '0',
`user_cell_sentence` text,
`user_cell_enable_caution` int(8) NOT NULL default '0',
`user_cell_enable_free` int(8) NOT NULL default '0',
`user_cell_celleds` int(8) NOT NULL default '0',
`user_cell_punishment` tinyint(1) NOT NULL default '0',
`user_photo` varchar(100) default NULL,
`user_photo_type` tinyint(4) NOT NULL default '0',
`user_ip` varchar(15) NOT NULL default '',
`user_lastlogin` varchar(12) NOT NULL default '',
`user_hits` varchar(11) NOT NULL default '0',
`user_lastlogindate` varchar(12) NOT NULL default '',
`user_flag` char(1) NOT NULL default '0',
`user_flagdate` varchar(12) NOT NULL default '',
`user_status` char(1) NOT NULL default '0',
`user_allow_arcadepm` tinyint(4) NOT NULL default '1',
`user_website2` varchar(100) default NULL,
`user_website3` varchar(100) default NULL,
`user_interests2` varchar(150) default NULL,
`user_custom_rank` varchar(255) default NULL,
PRIMARY KEY (`user_id`),
KEY `uid` (`user_id`),
KEY `uname` (`username`),
KEY `user_session_time` (`user_session_time`)
) TYPE=MyISAM AUTO_INCREMENT=220 ;
|
|
_________________ Those who dream by day are cognizant of many things which escape those who dream only by night. ~Poe |
|