<?PHP function mysqlTableComment( $db, $table ) { $sql = "SHOW TABLE STATUS FROM " . $db . " LIKE '" . $table . "'"; $result = @mysql_query( $sql ); $row = @mysql_fetch_array( $result, MYSQL_ASSOC ); return $row['Comment']; } ?>
<?PHP $conn = @mysql_connect("localhost", "mysql_user", "mysql_password"); if (!$conn) { echo "Fehlende Verbindung zur DB: " . mysql_error(); exit; } $database = 'test'; $table = 'testtabelle'; echo mysqlTableComment( $database, $table ); ?>