Tutorial :Way to retrieve MySql Fulltext indexs information from PHP?



Question:

I asked How to view MySql Fulltext Indexs and got myisam_ftdump as answer. But it's just a command line tool and I need to retrieve those information from PHP.

Is there any way to retrieve MySql Fulltext indexs information from PHP?

Thanks


Solution:1

I had a look, and what you're asking for doesn't appear to be very common. The simplest solution I can see is to use PHP's EXEC command to run the myisam_ftdump command, dumping the output file as a txt in a folder that you can access from PHP:

exec('myisam_ftdump yourtable 3 > /var/folder/yourFTindex.html')  

The alternative would be a scheduled task or cron job to execute the command, but you'll have to code up your PHP to turn the output into what you want.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »