Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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";
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #table #exists #sql #php
ADD COMMENT
Topic
Name
8+3 =