i2ppl
07-06-2007, 03:18
Hello friends!
I need your help in this case.
I've 2 tables: table1(id, id_bookname) and table2(id, id_bookname, bookname).
table1's `id_bookname` consists table2's integer `id_bookname`'s values.
Can i output combined query to DBGrid or DBEhlibGrid which contains table1's `id` and table2's `bookname`.
For instanse,
table1
id id_bookname
------------------------------
1 134
2 532
3 134
4 134
5 532
table2
id id_bookname bookname
-----------------------------------------------------
1 134 book1
2 532 book2
Results in DBGrid must be:
id bookname
---------------------------
1 book1
2 book2
3 book1
4 book1
5 book2
I need your help in this case.
I've 2 tables: table1(id, id_bookname) and table2(id, id_bookname, bookname).
table1's `id_bookname` consists table2's integer `id_bookname`'s values.
Can i output combined query to DBGrid or DBEhlibGrid which contains table1's `id` and table2's `bookname`.
For instanse,
table1
id id_bookname
------------------------------
1 134
2 532
3 134
4 134
5 532
table2
id id_bookname bookname
-----------------------------------------------------
1 134 book1
2 532 book2
Results in DBGrid must be:
id bookname
---------------------------
1 book1
2 book2
3 book1
4 book1
5 book2