Comparing large numbers in php and sql -


I need to compare a large number of php (30 digits long) with 2 numbers in my database. What is a good way to do it? I tried to use floats, but it was not accurate enough and I do not have a great way to use a large number of php.

Have you tried to compare the string? Just make sure that each number is padded with zero.

  mysql> Select "123123123123123123456456456" & lt; "123123123123123123456456457"; + ------------------------------------------------- ------------ + | "123123123123123123456456456" & lt; "123123123123123123456456457" | + ------------------------------------------------- ------------ + | 1 | + ------------------------------------------------- 


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -