Developer Center

Table Existence Check

It is the method that checks whether or not a table exists in the database.

hasTable

It written as WDB::hasTable(arg1) 

The table name must be written in "arg1".

Returns a value of data type "boolean" as the return value.

Sample PHP Code

<?php 
    $operation = WDB::hasTable("table1");

    if($operation)
    {
        echo "Successful";
    }
    else
    {
        echo "Error : ".$operation->getErrorMessage();
    }
    
?>
 
Exec and Query

Do you have any questions?

Feel free to contact us
Contact Us
Copyright © 2024. All Rights Reserved.
Join Our Discord Channel
Top