The following code checks for tables on the database.
function checkdbexists(){
global $krdb;
return $krdb->query("show tables");
}
We want to check whether a table called ‘systems’ exists returning 1 if it does and null or 0 if it does not.
you can use