VOID-Plugin icon indicating copy to clipboard operation
VOID-Plugin copied to clipboard

Fix issues with SQLite

Open BioniCosmos opened this issue 1 year ago • 0 comments

In Plugin.php, function hasColumn and hasTable use SHOW COLUMNS and SHOW TABLES, which is not supported by SQLite. Instead, we could use:

$sql = "SELECT * FROM pragma_table_info('" . $table . "') WHERE name LIKE '%" . $field . "%'";
$sql = "SELECT name FROM sqlite_master WHERE type='table' AND name LIKE '%" . $table . "%'";

BioniCosmos avatar Mar 13 '24 02:03 BioniCosmos