From: Jerome Jamnicky Date: Mon, 24 May 2004 22:24:49 +0000 (+0000) Subject: SHOW INDEX works in MySQL 3.23.58, but SHOW INDEXES does not. X-Git-Tag: 1.5.0alpha1~3207 X-Git-Url: https://git.cyclocoop.org/admin/?a=commitdiff_plain;h=cf5da16687cad002628e2c8d39e9dc1024ac667a;p=lhc%2Fweb%2Fwiklou.git 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 --- 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;