Jump to content
php.lv forumi

Pievieno, nevis atjauno


spermer_co

Recommended Posts

Taatad, problemina taada, ka mans kverijs nevis atjauno jau esoshus lietotaja datus, bet gan velreiz pievieno identisku ierakstu datubaazee, tapeec ludzu palidziet man atrisinat sho problemu. Tada sajuta ka vins neatpazist to ka "niks" ailiitee esoshie dati ir tadi pashi kaa $niks

 

$result = mysql_query("UPDATE `db_players` SET points='".$points."', x1x1played4='".$x1x1played4."'' WHERE niks='".$niks."'");
if (mysql_affected_rows() == 0)
{
$result = mysql_query("INSERT INTO db_cup_players (niks, points, x1x1played4) VALUES ('".$niks."', '".$points."', '".$x1x1played4."')");
}

Edited by spermer_co
Link to comment
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.

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

Loading...
×
×
  • Create New...