Okay you gurus!
Convert this bit of PHP into ANSI SQL
$input = 13;
$str = strrev( (string)decbin( $input ) );
for( $i = 0; $i < strlen( $str ); $i++ )
{
$var = pow( 2, $i );
$output[$var] = ( $str[$i] == 1 ) ? 'set' : 'unset';
}
print_r( $output );
The output of this code is an Array:
(
[1] => set
[2] => unset
[4] => set
[8] => set
)
All I want is a table of the same info.