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) Link to comment https://forums.phpfreaks.com/topic/72672-dynamically-generate-mysql-create-index-statements/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.