sql >> Base de Datos >  >> RDS >> Mysql

¿Cómo seleccionar con un campo binario? (php, mysql)

Respondiendo a mi propia pregunta.

Acabo de descubrir:

$where = "where HEX(ID) = 'bin2hex($aid)'";
$query = "SELECT * FROM X ".$where;

¿Alguien sabe una mejor solución?