Jump to content

Recommended Posts

here is the error:

Unknown column 'e_mail' in 'where clause'INSERT INTO `AccountDetails` (userName,race,e_mail,password,commander,active,uniqueLink) VALUES ('El Presidente','0','brianflores@ultimateconquest.com','00749359','','0','ug1255310986')

 

here is the code, any help would be cool,

function createUser($userName,$race,$e_mail,$password,$commander,$active=0,$uniqueLink="",$fortificationLevel=0,$siegeLevel=0,
$gold=2800,$lastTurnTime=0,$attackTurns=17,$currentUnitProduction=0,$currentSpySkill=0,
$trainedAttackSold=0,$trainedAttackMerc=0,$trainedDefSold=0,$trainedDefMerc=0,$untrainedSold=1,$untrainedMerc=0,$spies=0){
if (!$lastTurnTime){$lastTurnTime=time();}
$uniqueLink=genUniqueLink();


$str = "INSERT INTO `AccountDetails` (userName,race,e_mail,password,commander,active,uniqueLink) VALUES ('$userName','$race','$e_mail','$password','$commander','$active','$uniqueLink')";



echo "$str<br>";
$q = @mysql_query($str);
if (!$q) {
	print ('Query failed 1: '.mysql_error());
	return;
}		
$us=getUserDetailsByName($userName);
$userID=$us->ID;

$str2 = "INSERT INTO `UserDetails` (fortificationLevel,siegeLevel,
gold,lastTurnTime,attackTurns,currentUnitProduction,currentSpySkill,
trainedAttackSold,trainedAttackMerc,trainedDefSold,trainedDefMerc,untrainedSold,untrainedMerc,spies,ownerID) VALUES ('$fortificationLevel','$siegeLevel',
'$gold','$lastTurnTime','$attackTurns','$currentUnitProduction','$currentSpySkill',
'$trainedAttackSold','$trainedAttackMerc','$trainedDefSold','$trainedDefMerc','$untrainedSold','$untrainedMerc','$spies','$userID')";

$q = @mysql_query($str2);
if (!$q) {
	print ('Query failed 2: '.mysql_error());
	return;
} 

$str= "INSERT INTO `Ranks` (userID) VALUES ('$userID') ";
$q = @mysql_query($str);
return $q;

}

 

Thanks for any help I cannot figure out why is gives that error.

Link to comment
https://forums.phpfreaks.com/topic/177366-register-function-error-plz-help/
Share on other sites

The Unknown column 'e_mail' in 'where clause' is from some previous query on the page and the rest of what you printed is from your echo "$str<br>"; statement. You would need to identify the query that is causing the Unknown column 'e_mail' in 'where clause' error to be output.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.