3 placeholders 3 parameters.. not sure why I'd be getting an error
3 placeholders 3 parameters.. not sure why I'd be getting an error
date()--remote or --local with a recent version of wrangler?? is in my statement, there is a syntax error, regardless of where it is in the project
INSERT INTO ? (slug, type, data, clicks) VALUES (?, "ArtistLanding", ?, 0) router.post('/:brand/:slug', async (r,e,c) => {
const brand = r.brand;
const slug = r.slug;
const db = e.LINK_DB
const body = await r.json();
const stmt = db.prepare(`INSERT INTO ? (slug, type, data, clicks) VALUES ('?', "ArtistLanding", '?', 0)`)
stmt.bind(brand,slug,body.data)
return await stmt.run();
}){
"status": 500,
"error": "D1_ERROR: near \"?\": syntax error at offset 12"
}date()--remote--localINSERT INTO ? (slug, type, data, clicks) VALUES (?, "ArtistLanding", ?, 0)