SQL Selecione por conteúdo lenght
$query = ("SELECT * FROM $db WHERE conditions AND LENGTH(col_name) = 3");
ZigmaS
$query = ("SELECT * FROM $db WHERE conditions AND LENGTH(col_name) = 3");