mysql - PHP Script not respect greater than symbol (>) when write in DB -


i have game developed in scirra construct 2 saves scores in database. submit scores database using ajax, , hosting of receive php files . php checks if score sent greater score in existing database , , if greater , stores , , if less discards .

the game works , keep scores higher every time , have problem. if close game , open omits previous score , overwritten new being lower.

it seems resets write again , not respect saved score above.

for example:

if in first run 25 points, after 75 points, last value saved in db 75 because greater 25.

if after close game , run again, if first try 25, game should conserve 75 points, in case ocurrs error , 75 points changed 25 points, still if 25 < 75.

what's going on?

this php

[img]https://i.gyazo.com/6650fa313895fa1ffceb87dd2f1a8ebd.png[/img] [img]https://i.gyazo.com/844b2c2fadce1b85cf7b5cd3d8e36678.png[/img]

is writed in spanish.

the parameters u, pm, ps, pr pm, pt, sent ajax in normal way (with request url etc....) example:

request "url/updatescore.php?u="& iduser & "&ps=" & score

any error in php?

thanks!

there nothing in posted code compares actual values stored in database. variables initial values from? query database first? hard tell because haven't shown code.

if close game , open , variables not retrieved somewhere not have initial values , empty strings.


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -