tags:

views:

24

answers:

3

Hello,

Does anyone know of an equivalent function in MySQL of PHP's base_convert?

http://php.net/manual/en/function.base-convert.php

Thanks, Mark

+1  A: 

CONV()

Brock Batsell
Perfect! Thank you.
Mark L
A: 

CONV(N,from_base,to_base)

Converts numbers between different number bases. Returns a string representation of the number N, converted from base from_base to base to_base. Returns NULL if any argument is NULL. The argument N is interpreted as an integer, but may be specified as an integer or a string. The minimum base is 2 and the maximum base is 36. If to_base is a negative number, N is regarded as a signed number. Otherwise, N is treated as unsigned. CONV() works with 64-bit precision.

http://dev.mysql.com/doc/refman/5.1/en/mathematical-functions.html#function_conv

Álvaro G. Vicario
A: 

you could use CONV(N,from_base,to_base)

t00ny