File ManagerCurrent Directory: wp-content/plugins/wp-mail-smtp/src/HelpersLinux appserver-0d5e4f1e-php-cc8da225320a42ba9b7d66cba40b1f03 6.6.123+ #1 SMP PREEMPT_DYNAMIC Wed Mar 11 09:04:28 UTC 2026 x86_64Edit File: DB.php <?php namespace WPMailSMTP\Helpers; /** * Class for Database functionality. * * @since 3.6.0 */ class DB { /** * The function is used to check if the given index exists in the given table. * * @since 3.6.0 * * @param string $table The table name. * @param string $index The index name. * * @return bool If index exists then return true else returns false. */ public static function index_exists( $table, $index ) { global $wpdb; $query = $wpdb->prepare( 'SELECT COUNT(1) IndexIsThere FROM INFORMATION_SCHEMA.STATISTICS WHERE table_schema = DATABASE() AND table_name = %s AND index_name = %s', $table, $index ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared $result = $wpdb->get_var( $query ); return $result === '1'; } } Upload File Directory Listing NameTypeSizeActions.. (Parent Directory)DirCrypto.phpFile5.08 KB Rename | Delete | EditDB.phpFile841.00 B Rename | Delete | EditHelpers.phpFile3.52 KB Rename | Delete | EditPluginImportDataRetriever.phpFile10.83 KB Rename | Delete | EditUI.phpFile4.00 KB Rename | Delete | Edit