SQLite.swift
SQLite.swift copied to clipboard
bind dictionary params will crash
If I select use
try! connect?.prepare("SELECT * FROM words WHERE category=:category AND language=:language ORDER BY RANDOM()", ["category":category, "language":language])
it will crash, like this

But use
try! connect?.prepare("SELECT * FROM words WHERE category=? AND language=? ORDER BY RANDOM()", [category, language])
it‘s OK
@MingleChang Try to use $category instead of :category and tell me if it works.