hi,
i just read thru this forum and somebody said using concat_ws to search multiple tables
but when i use this the result seems strange.
i need to search thru around 15 tables
and i just tried 2 tables only
SELECT table1.search_link, table2.search_link
FROM table1, table2
WHERE (
concat_ws( '', table1.search_key_en, table2.search_key_en )
LIKE '%student%'
)
in table1:
it has 1 row
search_key_en contain words "student test", search_link contain "student link"
in table2:
it has 3 rows
row1: search_key_en contain "a", search_link contain "teacher link"
row2: search_key_en contain "slogan student teachers cyber ethics", search_link contain "teacher link"
row3: search_key_en contain "new", search_link contain "teacher link"
when i execute that sql statement thru phpmyadmin, it returns me:
search_link | search_link
teacher link | student link
teacher link | student link
empty | student link
just wondering , is it a correct result? since it returns me 3 rows, which i guess it only 1 row in table1 contain student and 1 row in table2 contaion student.