Answers for "how to test if table exists in mysql php"

PHP
2

check if table exists sql php

if ($result = $mysqli->query("SHOW TABLES LIKE '".$table."'")) {
    if($result->num_rows == 1) {
        echo "Table exists";
    }
}
else {
    echo "Table does not exist";
}
Posted by: Guest on December-08-2020

Code answers related to "how to test if table exists in mysql php"

Browse Popular Code Answers by Language