redbrad0 Posted October 10, 2007 Share Posted October 10, 2007 I know in mySql you can run "show indexes from TableName" and it will show you a list of all the index's for that table. What I would like to do is run this query to generate a create index statement that I can run on another database all thru PHP. Has anyone allready built something like this in PHP to post some code? mysql> SHOW INDEXES FROM reviews; +---------+---------------+--------+------+------------+---------+ | Table | Column_name | Packed | Null | Index_type | Comment | ----------+---------------+--------+------+------------+---------+ | reviews | id | NULL | | BTREE | | | reviews | data | NULL | YES | FULLTEXT | | +---------+---------------+--------+------+------------+---------+ 2 rows in set (0.01 sec) Quote Link to comment https://forums.phpfreaks.com/topic/72672-dynamically-generate-mysql-create-index-statements/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.