Jump to content
php.lv forumi

kverijs neatjauno, bet izveido tadu velvienu

Recommended Posts

Sveiki. Variet luudzu kads palabot sho mysql kveriju. Probleema taaada, ka tas nevis atjauno jau esoshos datus, kur niks = $niks, bet gan izveido velvienu taadu rindu. Kapec tas taa ir?


$result = mysql_query("UPDATE `db_cup_players` SET `points` = '".$points."', `x1x1played4` = '".$x1x1played4."', `x1x1played8` = '".$x1x1played8."', `meleeplayed6` = '".$meleeplayed6."', `meleeplayed8` = '".$meleeplayed8."', `totalplayed` = '".$totalplayed."', `x1x1final4` = '".$x1x1final4."', `x1x1final8` = '".$x1x1final8."', `meleefinal6` = '".$meleefinal6."', `meleefinal8` = '".$meleefinal8."', `totalfinal` = '".$totalfinal."', `x1x1win4` = '".$x1x1win4."', `x1x1win8` = '".$x1x1win8."', `meleewin6` = '".$meleewin6."', `meleewin8` = '".$meleewin8."', `totalwin` = '".$totalwin."', `firstcup` = '".$firstcup."', `lastcup` = '".$lastcup."' WHERE niks = '".$niks."'");
if (mysql_affected_rows() == 0)
// No records updated, so add it
$result = mysql_query("INSERT INTO `db_cup_players` (niks, points, x1x1played4, x1x1played8, meleeplayed6, meleeplayed8, totalplayed, x1x1final4, x1x1final8, meleefinal6, meleefinal8, totalfinal, x1x1win4, x1x1win8, meleewin6, meleewin8, totalwin, firstcup, lastcup) VALUES ('".$niks."', '".$points."', '".$x1x1played4."', '".$x1x1played8."', '".$meleeplayed6."', '".$meleeplayed8."', '".$totalplayed."', '".$x1x1final4."', '".$x1x1final8."', '".$meleefinal6."', '".$meleefinal8."', '".$totalfinal."', '".$x1x1win4."', '".$x1x1win8."', '".$meleewin6."', '".$meleewin8."', '".$totalwin."', '".$firstcup."', '".$lastcup."')");
echo Done;



Link to post
Share on other sites

Join the conversation

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

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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