Matt
Matt
Explore posts from servers
DTDrizzle Team
Created by Matt on 6/21/2024 in #help
D1_ERROR: near \"ilike\":
Can anyone spot what I'm doing wrong? Drizzle:
export async function searchByFontFamilyName(db: DB, search: string) {
return db
.select({
family: table_fonts.family,
})
.from(table_fonts)
.where(
ilike(table_fonts.family, `%${search}%`), // search: "nato"
);
}
export async function searchByFontFamilyName(db: DB, search: string) {
return db
.select({
family: table_fonts.family,
})
.from(table_fonts)
.where(
ilike(table_fonts.family, `%${search}%`), // search: "nato"
);
}
Logs this output:
Query: select "family" from "fonts" where "fonts"."family" ilike ? -- params: ["%nato%"]
Query: select "family" from "fonts" where "fonts"."family" ilike ? -- params: ["%nato%"]
I get this error:
D1_ERROR: near \"ilike\": syntax error at offset 66
D1_ERROR: near \"ilike\": syntax error at offset 66
3 replies