compare_reservation_tables()

  compare_reservation_tables( string $table_name )

WordPressの予約テーブルとテーブル名を比較します。

パラメータ

$table_name

比較するテーブル名を文字列で指定します。

返り値

比較した結果が Boolean 値で返ります。比較するテーブル名がWordPressで予約されているテーブル名と一致した場合は TRUE 、それ以外は FALSE が入ります。

変更履歴

バージョン 内容
1.0.0

使用例

<?php
global $cdbt;
$table_name = "posts";
if ($cdbt->compare_reservation_tables($table_name)) {
    echo "Table name: $table_name has been reserved by WordPress.";
} else {
    echo "Table name: $table_name is available.";
}