Jump to content

[SOLVED] Insertion


Dethman

Recommended Posts

Here is my Error please help,

 

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','[email protected]','83694713','','0','sc1254809263')' at line 1

 

Here is my Code.

 

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


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

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

$us=getAccountByName($userName);

$accountID=$us->ID;   

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

 

Any Help would be Nice

Link to comment
https://forums.phpfreaks.com/topic/176654-solved-insertion/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.