From 105189fb7ae3648024f92294581dd61d8f44cd7e Mon Sep 17 00:00:00 2001 From: Thomas Rubini <74205383+ThomasRubini@users.noreply.github.com> Date: Tue, 24 Jan 2023 14:50:13 +0100 Subject: [PATCH] Select other data for recipe search --- Models/RecipeModel.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Models/RecipeModel.php b/Models/RecipeModel.php index 9f79632..2e0b272 100644 --- a/Models/RecipeModel.php +++ b/Models/RecipeModel.php @@ -65,7 +65,10 @@ final class RecipeModel ) -- get a row per occurrence and sort by occurrences number - select RECIPE.ID, RECIPE.NAME + select RECIPE.ID, RECIPE.NAME, + CONCAT('/recipe/view/', RECIPE.ID) AS RECIPE_LINK, + CONCAT('/static/img/recipes/', RECIPE.ID) AS IMG_LINK, + 1 AS NOTE from CTE JOIN RECIPE WHERE CTE.NAME is not null