From cf5da16687cad002628e2c8d39e9dc1024ac667a Mon Sep 17 00:00:00 2001 From: Jerome Jamnicky Date: Mon, 24 May 2004 22:24:49 +0000 Subject: [PATCH] SHOW INDEX works in MySQL 3.23.58, but SHOW INDEXES does not. SHOW INDEX should work for 3.x and up: http://dev.mysql.com/doc/mysql/en/SHOW_INDEX.html --- includes/Database.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/Database.php b/includes/Database.php index db203fb7fb..a3b4c45128 100644 --- a/includes/Database.php +++ b/includes/Database.php @@ -316,7 +316,10 @@ class Database { # If errors are explicitly ignored, returns NULL on failure function indexExists( $table, $index, $fname = "Database::indexExists" ) { - $sql = "SHOW INDEXES FROM $table"; + # SHOW INDEX works in MySQL 3.23.58, but SHOW INDEXES does not. + # SHOW INDEX should work for 3.x and up: + # http://dev.mysql.com/doc/mysql/en/SHOW_INDEX.html + $sql = "SHOW INDEX FROM $table"; $res = $this->query( $sql, DB_READ, $fname ); if ( !$res ) { return NULL; -- 2.20.1