PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 2.10.2
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v2.10.2
3.3.1 V-3.3.0 3.2.2 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 V3.0.3 V3.0.2 -3.0.1 V_3.0.0 1.1.1 1.1.8 1.2 1.3 1.4 1.4.18 1.5.2 1.9 2.0 2.10.0 2.10.1 All 138 releases
bit-form / v1 / includes / Core / Util / Utilities.php

Utilities.php in Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder 2.10.2, at v1/includes/Core/Util/Utilities.php

26 lines 651 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace BitCode\BitForm\Core\Util;
4
5 final class Utilities
6 {
7 public static function duplicateDbTable($oldTableName, $newTableName)
8 {
9 global $wpdb;
10 $oldTable = "{$wpdb->prefix}bitforms_{$oldTableName}";
11 $newTable = "{$wpdb->prefix}bitforms_{$newTableName}";
12 // $wpdb->query("CREATE TABLE IF NOT EXISTS $newTable LIKE $oldTable");
13 // $wpdb->query("INSERT $newTable SELECT * FROM $oldTable");
14 $wpdb->query(
15 $wpdb->prepare(
16 "CREATE TABLE IF NOT EXISTS $newTable LIKE $oldTable"
17 )
18 );
19 $wpdb->query(
20 $wpdb->prepare(
21 "INSERT $newTable SELECT * FROM $oldTable"
22 )
23 );
24 }
25 }
26