public static function init_queries($tablesexisting)
{
require_once QA_INCLUDE_DIR."db/selects.php";
if (!in_array(qa_db_add_table_prefix('table_name'), $tablesexisting)) {
return
'CREATE TABLE IF NOT EXISTS ^table_name (
id INT AUTO_INCREMENT PRIMARY KEY,
cid INT NOT NULL,
url VARCHAR(300) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;';
}
return null;
}
This is the code for add a table if it not exist in the database.