Pagina 1 van 1

Registreer erro

Geplaatst: 08 jun 2004, 18:44
door desert spider
hallo ik heb de een paar mods voor de profiel geinstaleert
nu wou ik eens kijken of het Registreeren het nog wel dee
maar die doet het niet ik krijg deze erro

Code: Selecteer alles

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, '', '', '', 0, 0, '',

INSERT INTO phpbb_users (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_from_flag, user_interests, user_car_mark, user_car_model, user_car_year, user_car_engine, user_car_wheel, user_car_trans, user_car_color, user_car_foto, 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 (17, 'test3', 1086716391, 'f7f03d96e22959ad06233baa224d9494', 'test2@test.test', '', '', '', '', netherlands.gif', '', '', '', '', '', '', '', '', '', 0, '', '', '', 0, 0, '', '', '', 1, 1, 0, 1, 1, 0, 1, 1, 2, 'D M d, Y H:i', 'dutch', 4, '1', 0, 1, '7546', '2004', 1, '')

Line : 712
File : /home/owns/public_html/hwfactory/forum/includes/usercp_register.php
ik zou het niet weten wat de fout zou kunnen zijn

alvast bedankt
desert spider

Geplaatst: 08 jun 2004, 18:51
door WebSiteNet
Hier:

Code: Selecteer alles

, netherlands.gif'
Voor netherlands moet een '

Kan je de query uit usercp_register.php geven (voor regel 712)?

Geplaatst: 08 jun 2004, 18:55
door desert spider
kan het niet volgen
dit is de install voor usercp_register.php

Code: Selecteer alles

# 
#-----[ OPEN ]------------------------------------------ 
# 
includes/usercp_register.php


#
#-----[ FIND ]------------------------------------------ 
#
# NOTE: the complete line to find is:
#  $user_timezone = ( isset($HTTP_POST_VARS['timezone']) ) ? doubleval($HTTP_POST_VARS['timezone']) : $board_config['board_timezone'];
#
	$user_timezone = (

#
#-----[ AFTER, ADD ]------------------------------------------ 
#

// FLAGHACK-start
	$user_flag = ( !empty($HTTP_POST_VARS['user_flag']) ) ? $HTTP_POST_VARS['user_flag'] : '' ;
// FLAGHACK-end

#
#-----[ FIND ]------------------------------------------ 
# Looking for the only UPDATE sql statement in the file; I'm not quoting the whole thing!!
#
			$sql = "UPDATE " . USERS_TABLE . "
 user_from = '" . str_replace("\'", "''", $location) . "', 


#
#-----[ IN-LINE FIND ]------------------------------------------ 
#
user_from = '" . str_replace("\'", "''", $location) . "',


#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------ 
#
 user_from_flag = '$user_flag',


#
#-----[ FIND ]------------------------------------------ 
#
# from the sql statement:	$sql = "INSERT INTO " . USERS_TABLE . "	(user_id...
#					VALUES ($user_id, ...
#
$sql = "INSERT INTO " . USERS_TABLE
VALUES (


#
#-----[ IN-LINE FIND ]------------------------------------------ 
#
user_from,


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


#
#-----[ IN-LINE FIND ]------------------------------------------ 
#
'" . str_replace("\'", "''", $location) . "',


#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------ 
#
 '$user_flag',


#
#-----[ FIND ]------------------------------------------ 
#
	$location = $userdata['user_from'];


#
#-----[ AFTER, ADD ]------------------------------------------ 
#

// FLAGHACK-start
	$user_flag = $userdata['user_from_flag'];	
// FLAGHACK-end

#
#-----[ FIND ]------------------------------------------ 
#
# from the function call to display_avatar_gallery(...)
#
display_avatar_gallery(


#
#-----[ IN-LINE FIND ]------------------------------------------ 
#
$location,


#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------ 
#
 $user_flag,


#
#-----[ FIND ]------------------------------------------ 
#
	if ( $mode == 'editprofile' )
	{
		$template->assign_block_vars('switch_edit_profile', array());
	}


#
#-----[ AFTER, ADD ]------------------------------------------ 
#

// FLAGHACK-start
	// query to get the list of flags
	$sql = "SELECT *
		FROM " . FLAG_TABLE . "
		ORDER BY flag_id";
	if(!$flags_result = $db->sql_query($sql))
	{
		message_die(GENERAL_ERROR, "Couldn't obtain flags information.", "", __LINE__, __FILE__, $sql);
	}
	$flag_row = $db->sql_fetchrowset($ranksresult);
	$num_flags = $db->sql_numrows($ranksresult) ;

	// build the html select statement
	$flag_start_image = 'blank.gif' ;
	$selected = ( isset($user_flag) ) ? '' : ' selected="selected"'  ;
	$flag_select = "<select name=\"user_flag\" onChange=\"document.images['user_flag'].src = 'images/flags/'
 + this.value;\" >";
	$flag_select .= "<option value=\"blank.gif\"$selected>" . $lang['Select_Country'] . "</option>";
	for ($i = 0; $i < $num_flags; $i++)
	{
		$flag_name = $flag_row[$i]['flag_name'];
		$flag_image = $flag_row[$i]['flag_image'];
		$selected = ( isset( $user_flag) ) ? (($user_flag == $flag_image) ? 'selected="selected"' : '' ) : '' ;
		$flag_select .= "\t<option value=\"$flag_image\"$selected>$flag_name</option>";
		if ( isset( $user_flag) && ($user_flag == $flag_image))
		{
			$flag_start_image = $flag_image ;
		}
	}
	$flag_select .= '</select>';
// FLAGHACK-end


#
#-----[ FIND ]------------------------------------------ 
#
		'LOCATION' => $location,


#
#-----[ AFTER, ADD ]------------------------------------------ 
#

// FLAGHACK-start
		'L_FLAG' => $lang['Country_Flag'],
		'FLAG_SELECT' => $flag_select,
		'FLAG_START' => $flag_start_image,
// FLAGHACK-end


# 
#-----[ OPEN ]------------------------------------------ 
# 
includes/usercp_avatar.php


#
#-----[ FIND ]------------------------------------------ 
#
# from the function declaration of display_avatar_gallery(...)
#
function display_avatar_gallery(


#
#-----[ IN-LINE FIND ]------------------------------------------ 
#
&$location,


#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------ 
#
 &$user_flag,


#
#-----[ FIND ]------------------------------------------ 
#
# from the line $params = array(...)
#
$params = array(


#
#-----[ IN-LINE FIND ]------------------------------------------ 
#
'location',


#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------ 
#
 'user_flag',

Geplaatst: 08 jun 2004, 18:57
door WebSiteNet
In de error wordt een query uitgebeeld met een fout. Die fout zit in includes/usercp_register.php in die query. Die query is de eerste query voor regel 712. Kan je die kopiƫren & plakken?

Geplaatst: 08 jun 2004, 19:00
door desert spider
oh zo

Code: Selecteer alles

$sql = "INSERT INTO " . USERS_TABLE . "	(user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_from_flag, user_interests, user_car_mark, user_car_model, user_car_year, user_car_engine, user_car_wheel, user_car_trans, user_car_color, user_car_foto, 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) . "', " . time() . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $location) . "', $user_flag', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $car_mark) . "', '" . str_replace("\'", "''", $car_model) . "', '" . str_replace("\'", "''", $car_year) . "', '" . str_replace("\'", "''", $car_engine) . "', '" . str_replace("\'", "''", $car_wheel) . "', '" . str_replace("\'", "''", $car_trans) . "', '" . str_replace("\'", "''", $car_color) . "', '" . str_replace("\'", "''", $car_foto) . "', $profile_view_popup, '" . 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, $popup_pm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, '$gender', 0, 1, '$birthday', '$next_birthday_greeting', ";
			if ( $board_config['require_activation'] == USER_ACTIVATION_SELF || $board_config['require_activation'] == USER_ACTIVATION_ADMIN || $coppa )
			{

Geplaatst: 08 jun 2004, 19:05
door WebSiteNet
Zoek:

Code: Selecteer alles

str_replace("\'", "''", $location) . "', $user_flag',
Vervang met:

Code: Selecteer alles

str_replace("\'", "''", $location) . "', '$user_flag',

Geplaatst: 08 jun 2004, 19:10
door desert spider
bedankt het werkt