I have two tables:
table a
ida valuea
1 a
2 b
3 c
1 d
1 e
2 f
table b
idb valueb
1
2
I make valueb as a combobox and need to source it from a query that selects valuea if only ida = current idb.and table b become:
table b
idb valueb
1 (a,d,e)
2 (b,f)
It is difficult to tell exactly what you are asking, but I think you are either looking for just a simple INNER JOIN:
Or you need to concatenate the rows from tableA into a single row with IDB. The methods of doing this are DBMS dependant, since you have not specified a DMBS I have answered with as many as I know. Each of which has an example on SQL Fiddle.
SQL-Server
MySQL/SQLite
PostgreSQL
Oracle