Lucian
Lucian
CDCloudflare Developers
Created by Lucian on 12/13/2023 in #d1-database
I started getting a weird error with one
8c0b4f3d-f92c-42fe-b593-dabfecc46414
4 replies
CDCloudflare Developers
Created by Lucian on 12/13/2023 in #d1-database
I started getting a weird error with one
Here is the code that runs: try{ let res = null
const info = await c.env.DB.prepare(INSERT INTO scores_overunder ( userid, redTeam1id, redTeam2id, blueTeam1id, blueTeam2id, redTeam1Number, redTeam2Number, blueTeam1Number, blueTeam2Number, red_total, blue_total, red_auto_bonus, blue_auto_bonus, red_goal_points, red_field_points, blue_goal_points, blue_field_points, red1_height, red2_height, blue1_height, blue2_height, red1_height_bonus, red2_height_bonus, blue1_height_bonus, blue2_height_bonus, collected, created, type, total_time) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, DATETIME('now'), ?, ? )).bind( userid, data.redTeam1id, data.redTeam2id, data.blueTeam1id, data.blueTeam2id, data.redTeam1Number, data.redTeam2Number, data.blueTeam1Number, data.blueTeam2Number, data.red_total, data.blue_total, data.red_auto_bonus, data.blue_auto_bonus, data.red_goal_points, data.red_field_points, data.blue_goal_points, data.blue_field_points, data.red1_height, data.red2_height, data.blue1_height, data.blue2_height, data.red1_height_bonus, data.red2_height_bonus, data.blue1_height_bonus, data.blue2_height_bonus, data.collected, data.type, data.total_time) .run();
res = {result: info}
return c.json(res) } catch (e:any) {console.log(e.cause);}
4 replies