update tableA set $move_to=$move_to+(IF($ammount>$move_from,$move_from,$ammount)) ,$move_from=$move_from-( IF($ammount>$move_from,$move_from,$ammount)) where name = '$user_name'
The above works fine until a negitave value gets assigned to $ammount. How can I make it so that nothing is done if a negative value is entered in the form which assigns the value to $ammount.