[Phpmyadmin-devel] sqlparser.lib.php#392 ($c == '.') && ($c ==
Marc Delisle
Marc.Delisle at cegepsherbrooke.qc.ca
Wed Feb 7 15:05:30 CET 2007
Sebastian Mendel a écrit :
> Sebastian Mendel schrieb:
>> Hi,
>>
>> just curious about
>>
>> $is_hex_digit = ($is_digit) && ($c == '.') && ($c == '0') &&
>> ($count2 < $len) && (PMA_substr($sql, $count2, 1) == 'x');
>>
>> on line #392
>>
>>
>> how can $c be '.' AND '0' ???
>
> Revision: 7554
> Author: nijel
> Date: 20:50:45, Freitag, 14. Oktober 2005
> Message:
> Handle correctly float like .01 (bug #1252713).
> ----
> Modified : /trunk/phpMyAdmin/ChangeLog
> Modified : /trunk/phpMyAdmin/libraries/sqlparser.lib.php
>
>
>
>
This would do a better job:
$is_hex_digit = ($is_digit) && ($c == '0')
&& ($count2 < $len) && (PMA_substr($sql, $count2, 1) == 'x');
even if not all cases of hex are catched with this logic, see
http://dev.mysql.com/doc/refman/5.0/en/hexadecimal-values.html
More information about the Developers
mailing list