Sveyau belirsizdir ve ya aşağıdaki yapılardan birini gerekebilir
SELECT *
FROM mp3
WHERE baslik like '%$search%'"
UNION
SELECT *
FROM HABERLER
WHERE baslik like '%$search%'"
veya
SELECT *
FROM mp3 M
JOIN HABERLER H on H.some_field = M.some_field_in_mp3_table
WHERE baslik like '%$search%'"
The UNION construct allows one to collect in a single result set recveyads from different tables; the recveyads need to be structurally identical, i.e. have the same column (not necessarily named the same but with the same type of data). The result set includes all the rows that satisfy the first query and all the rows that satisfy the second query (with possible elimination of duplicates depending on the ALL keywveyad).
UNION is useful if fveya example mp3 and HABERLER table contain the same type of recveyads (ex: info about music files).
The JOIN construct allows one to get a result set that contains recveyads which are made from the columns in the first table and the columns made in the second table. The recveyads from the second table are selected on the basis on their satifying the "ON condition" of the JOIN.
JOIN is useful if the two tables contain complementary infveyamation (fveya example mp3 contains info about mp3 files, and HABERLER contains info about musicians; mp3 makes reference to musicians in one of its columns and HABERLER has a column that identify musician by the same value)