Using SHOW in Subquery
Posted: Fri Feb 08, 2008 9:10 pm
Is something like this possible?
SELECT Column_name FROM (SHOW INDEX FROM $_table) AS a WHERE a.Non_unique = 0
If not, how can I select the PRIMARY KEY column name for a table and use it in the same query? For example I need to say:
SELECT primary key FROM $_table WHERE $this->pKeyField = $this->pKey
SELECT Column_name FROM (SHOW INDEX FROM $_table) AS a WHERE a.Non_unique = 0
If not, how can I select the PRIMARY KEY column name for a table and use it in the same query? For example I need to say:
SELECT primary key FROM $_table WHERE $this->pKeyField = $this->pKey