[QUOTE=bartho;11485]Hello,
Have you tried to set an alias to the concatenated field? See below…
SELECT HCPCS_CODE, CONCAT(HCPCS_CODE,’ ',MODIFIER) AS MHCPCS_MODIFIER
FROM hcpcs_codes_new
WHERE (CATEGORY = 1 and FACILITY = 1 and code_year = 2012) AND HCPCS_CODE = ‘’
ORDER BY HCPCS_CODE
regards,
Bernhard Bernsmann[/QUOTE]
Hi Bernhard, I’ve same problem in a form with autocomplete field with 2 fields using “concat”
I’ve tried:
SELECT id, CONCAT (apellido," ", nombre) AS usuario_buscar
FROM usuarios
ORDER BY apellido
with no results (autocomplete field no show anything)
table “usuarios” are defined in this way
CREATE TABLE IF NOT EXISTS usuarios (
id int(11) NOT NULL AUTO_INCREMENT,
nombre varchar(30) NOT NULL,
apellido varchar(30) NOT NULL,
id_grupo int(11) NOT NULL,
id_ip int(11) NOT NULL,
tipo_de_conexion enum(‘ip_fija’,‘pppoe’,‘dhcp’) NOT NULL,
pppoe_user varchar(30) DEFAULT NULL,
pppoe_pass varchar(30) DEFAULT NULL,
nat enum(‘comun’,‘mapeo’,‘no’) NOT NULL,
id_ip_nat int(11) DEFAULT NULL,
Mac varchar(17) DEFAULT NULL,
id_cpe_class int(11) DEFAULT NULL,
id_ip_cpe int(11) DEFAULT NULL,
mac_cpe varchar(17) DEFAULT NULL,
info_adicional text,
activo tinyint(1) NOT NULL DEFAULT ‘1’,
id_nodo int(11) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ;
the only query that works with autocomplete is without Concat
SELECT id, apellido
FROM usuarios
ORDER BY apellido
any hints?