Concat two columns of mysql table in one serially? -


i working on autocomplete , need data 2 columns 1 through mysql :

i have table such as

id serial name 1  ehy    audi 2  ehz    lemo 3  ehm    ferrari 

now want result in 1 table want autocomplete bring data both serial , name fields this

-list- ehy ehz ehm audi lemo ferrari 

can done in single query call?

i used query,(its example), want similar binding data serially.

select concat(c.name, c.serial) lising data c 

you're looking union syntax:

select `serial` `table` union select `name` `table` 

Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -