Facebook user_id : big_int, int or string?

前端 未结 8 937
忘掉有多难
忘掉有多难 2020-12-13 08:41

Facebook\'s user id\'s go up to 2^32 .. which by my count it 4294967296.

mySQL\'s unsigned int\'s range is 0 to 4294967295 (which is 1 short - or my math is wrong) a

8条回答
  •  囚心锁ツ
    2020-12-13 09:13

    Store them as strings.

    The Facebook Graph API returns ids as strings, so if you want comparisons to work without having to cast, you should use strings. IMO this trumps other considerations.

提交回复
热议问题