while($x < 10)
{
$str = "( NULL, '{$players[$x]}', '1' , 0 + {$sonucs[$x]},oynananoyun - win,'{$rols[$x]}','{$teams[$x]}','{$playerkills[$x]}','{$playerdeaths[$x]}','{$playerassists[$x]}','{$creeps[$x]}','{$dmgs[$x]}','{$dpms[$x]}','{$wards[$x]}','{$playergolds[$x]}','{$gpms[$x]}', '{$goldpercantages[$x]}', 0 + {$fbs[$x]},'{$dmgpercantages[$x]}', '{$wardscleared[$x]}', '{$wpm[$x]}', '{$wcpm[$x]}','{$wardpercents[$x]}', '{$wardsclearedpercents[$x]}', '{$cspms[$x]}')";
$yaya = "kill = kill + {$playerkills[$x]}, death = death + {$playerdeaths[$x]},assist = assist + {$playerassists[$x]},cs = cs + {$creeps[$x]}, cspm = cspm + {$cspms[$x]}, takim = {$teams[$x]}, dmg = dmg + {$dmgs[$x]}, dpm = dpm + {$dpms[$x]},wardplaced = wardplaced + {$wards[$x]}, oynananoyun = oynananoyun + 1, win = win + {$sonucs[$x]}, rol = {$rols[$x]}, gold = gold + {$playergolds[$x]}, goldshare = goldshare + {$goldpercantages[$x]}, gpm = gpm + {$gpms[$x]}, fb = fb + {$fbs[$x]}, dmgshare = dmgshare + {$dmgpercantages[$x]}, wardcleared = wardcleared + {$wardscleared[$x]}, wardplacedpm = wardplacedpm + {$wpm[$x]}, wardclearedpm = wardclearedpm + {$wcpm[$x]}, wardplacedshare = wardplacedshare + {$wardpercents[$x]}, wardclearedshare = wardclearedshare + {$wardsclearedpercents[$x]}";
mysql_query ("INSERT INTO playerstats18 (`id`,`player`,`oynananoyun`,`win`,`lose`,`rol`,`takim`,`kill`,`death`,`assist`,`cs`,`dmg`,`dpm`,`wardplaced`,`gold`,`goldshare`,`gpm`,`fb`,`dmgshare`,`wardcleared`,`wardplacedpm`,`wardclearedpm`,`wardplacedshare`,`wardclearedshare`,`cspm`) VALUES $str ON DUPLICATE KEY UPDATE $yaya");
$x++;
}
mysql_query was working but then i added more values at $yaya and its not working now. Im not missing any commas, I checked it. Its not updating or inserting.
" 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 'kill = kill + 0, death = death + 1,assist = assist + 14,cs = cs + 28, cspm = csp' at line 1 "
'kill = kill + 0, death = death + 1,assist = assist + 14,cs = cs + 28, cspm = csp' at line 1
What $yaya loooks like
kill = kill + 0, death = death + 1,assist = assist + 14,
cs = cs + 28, cspm = cspm + 1, takim = DP,
dmg = dmg + 3.0, dpm = dpm + 110,wardplaced = wardplaced + 43,
oynananoyun = oynananoyun + 1, win = win + 1 , rol = Support,
gold = gold + 7.7b, goldshare = goldshare + 14.1,
gpm = gpm + 283, fb = fb + 0,
dmgshare = dmgshare + 6.4, wardcleared = wardcleared + 9,
wardplacedpm = wardplacedpm + 1.58,
wardclearedpm = wardclearedpm + 0.33,
wardplacedshare = wardplacedshare + 29.6,
wardclearedshare = wardclearedshare + 31
edit: i changed yaya string to
$yaya = "`kill` = `kill` + {$playerkills[$x]},
death = death + {$playerdeaths[$x]},
assist = assist + {$playerassists[$x]},
cs = cs + {$creeps[$x]},
cspm = cspm + {$cspms[$x]},
takim = '{$teams[$x]}',
dmg = dmg + {$dmgs[$x]},
dpm = dpm + {$dpms[$x]},
wardplaced = wardplaced + {$wards[$x]},
oynananoyun = oynananoyun + 1,
win = win + {$sonucs[$x]},
rol = '{$rols[$x]}',
gold = gold + '{$playergolds[$x]}',
goldshare = goldshare + {$goldpercantages[$x]},
gpm = gpm + {$gpms[$x]}, fb = fb + {$fbs[$x]},
dmgshare = dmgshare + {$dmgpercantages[$x]},
wardcleared = wardcleared + {$wardscleared[$x]},
wardplacedpm = wardplacedpm + {$wpm[$x]},
wardclearedpm = wardclearedpm + {$wcpm[$x]},
wardplacedshare = wardplacedshare + {$wardpercents[$x]},
wardclearedshare = wardclearedshare + {$wardsclearedpercents[$x]}";
I changed kill to kill
,
{$playergolds[$x]} to '{$playergolds[$x]}' because it has "b" (6.6b forexample
and quoted varchars (not sure if it was necessary).