Saori
Saori
DTDrizzle Team
Created by Saori on 2/17/2024 in #help
Raw mysql query not accepting variable input
ahh interesting. long live asap
4 replies
DTDrizzle Team
Created by Saori on 2/17/2024 in #help
Raw mysql query not accepting variable input
figured it out:
async listAllContent(rowNames: string[]) {
for (const rowName of rowNames) {
const allContent = await db.execute(
sql`SELECT * FROM ${sql.identifier(rowName)}`
)
console.log(`All content from ${rowName}:`, allContent.rows)
}
}
async listAllContent(rowNames: string[]) {
for (const rowName of rowNames) {
const allContent = await db.execute(
sql`SELECT * FROM ${sql.identifier(rowName)}`
)
console.log(`All content from ${rowName}:`, allContent.rows)
}
}
4 replies