0

when i do mysqli update using prepare and then bind param like:

$stmt->bind_param("ii", $svr_id, $group_id)

here comes the problem: In my database, svr_id was defined as unsigned int, but when binding, it is specified by int. when

$svr_id>0x1000 0000 0000 0000 0000 0000 0000 0000

, it seems that it was considered to be a negative num, and the update command failed. but i can't find a param to make it unsigned int in function bind_param(); Is anyone can help to solve this?

HenrySnoopy
  • 327
  • 1
  • 3
  • 8

1 Answers1

0

Your number greater that MAX_INT. When you trying to bind php converts it to integer.

Solution: bind values as strings.

sectus
  • 15,605
  • 5
  • 55
  • 97