Closed lsbyerley closed 3 months ago
@lsbyerley great question, yes, that's correct! these docs should help: here. there are a few different ways to use parameter binding, but the simplest example is ordered binding—e.g., for each ?
in your statement, the bind
ed values will replace the ?
in order:
const { meta: write } = await db
.prepare(`INSERT INTO ${tableName} (name, short_name, conference) VALUES (?,?,?);`)
.bind("data1", "data2", "data3")
.run();
I already have a table deployed and would like to use this ui to insert rows into the table. I am curious how to add more fields to the insert statement. Does bind() combine the values into a string in the db insert function?