George F.Ramzi
George F.Ramzi
DTDrizzle Team
Created by George F.Ramzi on 5/29/2023 in #help
Bug When Trying To Increment A Field
this set the field to 0 instead of increasing by one it used to work in other routes
await db
.update(Artists)
.set({ songs: sql`${Artists.songs} = ${Artists.songs} + 1 ` })
.where(eq(Artists.id, id));
await db
.update(Artists)
.set({ songs: sql`${Artists.songs} = ${Artists.songs} + 1 ` })
.where(eq(Artists.id, id));
4 replies