Jump to content
php.lv forumi

MySql kvērijs - %


snach15

Recommended Posts

gribu panākt tā lai lietotājs kad inputā ieraksta summu, piemēram 100 un submito tad no tās summas noņem 10% un tā summa vienkārši kautkur izkūp gaisā, bet pārējais (90) tiek nogādāts tālāk .. man izdevās tikai ķipa visi 100 aiziet tālāk no pēctam no tiem 100 viņš aprēķina kad jānoņem ir 10 un noņem vēl papildus nost ...

.

$summa - 10%;

mysql_query("UPDATE user SET punkti = punkti + $summa WHERE username='".$_SESSION['username']."'");

Edited by snach15
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...