Hello guys.
I was wondering how does one create fulltext search all tables in database??? As MySQL supports fulltext only with MyISAM, and MyISAM do not support relations, how am I supposed to search all tables, as in my database there are almost 20 tables???
Help...
Run the SHOW TABLES sql query to get a list of tables as a resultset, then loop thru them one by one and do your search
Thank you, i will try 🙂))
Is there any way to join retreived data from separate tables into one big result?
I need it for displaying purposes, as I display results in multiple pages (using navigation bar)...
misxa wrote:Is there any way to join retreived data from separate tables into one big result? I need it for displaying purposes, as I display results in multiple pages (using navigation bar)...
maybe using UNION, but i am not sure how far is the mySQL compatibility here with subselects etc.
are you sure you need 20 tables, if you are searching them all then maybe they should have been all in 1 table to start with.
I dunno what you mean by 'not supporting relations'?? How would implementing 'Relational Integrity' help in a search?
SELECT some_field, some_field2 FROM table1 UNION SELECT some_field, some_field2 FROM table2 UNION SELECT some_field, some_field2 FROM table3
...
You can search the MySQL online docs for 'UNION SYNTAX'