PATH:
home
/
letacommog
/
newrdv1
/
wp-content
/
plugins1
/
wiloke-listing-tools
/
app
/
AlterTable
<?php namespace WilokeListingTools\AlterTable; trait TableExists { private static $isCheckEngine = false; public function isTableExists() { global $wpdb; $tblName = $wpdb->prefix.self::$tblName; $result = $wpdb->query("SHOW TABLES LIKE '".$tblName."'"); if (!$result) { if (!self::$isCheckEngine) { if (!self::isInnoDB()) { self::convertDefaultTblsToInno(); } self::$isCheckEngine = true; } return false; } if (get_option(self::$tblName) && (version_compare(get_option(self::$tblName), $this->version, '>='))) { return true; } update_option(self::$tblName, $this->version); return true; } private static function isInnoDB() { global $wpdb; return $wpdb->get_var("SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE engine = 'innodb'"); } private static function convertDefaultTblsToInno() { global $wpdb; $wpdb->query("ALTER TABLE {$wpdb->posts} ENGINE=InnoDB;"); $wpdb->query("ALTER TABLE {$wpdb->comments} ENGINE=InnoDB;"); $wpdb->query("ALTER TABLE {$wpdb->users} ENGINE=InnoDB;"); } }
[+]
..
[-] AlterTableSharesStatistic.php
[edit]
[-] AlterTableEventsData.php
[edit]
[-] .AlterTable.php
[edit]
[-] AlterTableReviews.php
[edit]
[-] AlterTableBusinessHourMeta.php
[edit]
[-] AlterTableNotifications.php
[edit]
[-] AlterTableFollower.php
[edit]
[-] AlterTableFavoriteStatistic.php
[edit]
[-] AlterTableBusinessHours.php
[edit]
[-] AlterTableViewStatistic.php
[edit]
[-] AlterTablePaymentMeta.php
[edit]
[-] AlterTableReviewMeta.php
[edit]
[-] AlterTableInvoices.php
[edit]
[-] AlterTableLatLng.php
[edit]
[-] AlterTableFavoritesStatistic.php
[edit]
[-] AlterTableInterface.php
[edit]
[-] AlterTableMessage.php
[edit]
[-] AlterTablePosts.php
[edit]
[-] AlterTablePaymentPlanRelationship.php
[edit]
[-] AlterTablePaymentHistory.php
[edit]
[-] AlterTableComment.php
[edit]
[-] AlterTableInvoiceMeta.php
[edit]
[-] TableExists.php
[edit]
[-] AlterTablePlanRelationships.php
[edit]