From 4f135f8464e066c1b6a8e30a3712f14692a3b2ff Mon Sep 17 00:00:00 2001 From: Nulo Date: Mon, 15 Jan 2024 15:55:05 -0300 Subject: [PATCH] no filtrar productos por stock --- sitio/src/routes/search/+page.server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sitio/src/routes/search/+page.server.ts b/sitio/src/routes/search/+page.server.ts index 39c15d3..e0f9f9d 100644 --- a/sitio/src/routes/search/+page.server.ts +++ b/sitio/src/routes/search/+page.server.ts @@ -11,7 +11,7 @@ export const load: PageServerLoad = async ({ url }) => { join precios p on p.ean = f.ean where f.name match ${`"${query}"`} group by p.ean - having max(p.fetched_at) and max(p.in_stock) + having max(p.fetched_at) order by p.in_stock desc;`; results = db.all(sqlQuery); }