replace NAME with USERNAME in recipe view
This commit is contained in:
parent
78a1794c1a
commit
1f34989144
@ -25,7 +25,7 @@ final class RecipeModel
|
|||||||
$A_recipe["INGREDIENTS"] = $O_ingredientModel->searchByRecipe($A_recipe["ID"]);
|
$A_recipe["INGREDIENTS"] = $O_ingredientModel->searchByRecipe($A_recipe["ID"]);
|
||||||
|
|
||||||
$O_userModel = new UserModel();
|
$O_userModel = new UserModel();
|
||||||
$A_recipe["AUTHOR_NAME"] = $O_userModel->getNameByID($A_recipe["AUTHOR_ID"]);
|
$A_recipe["AUTHOR_USERNAME"] = $O_userModel->getUsernameByID($A_recipe["AUTHOR_ID"]);
|
||||||
|
|
||||||
$O_userModel = new DifficultyModel();
|
$O_userModel = new DifficultyModel();
|
||||||
$A_recipe["DIFFICULTY_NAME"] = $O_userModel->getByID($A_recipe["DIFFICULTY_ID"]);
|
$A_recipe["DIFFICULTY_NAME"] = $O_userModel->getByID($A_recipe["DIFFICULTY_ID"]);
|
||||||
|
@ -46,10 +46,10 @@ final class UserModel
|
|||||||
return $row;
|
return $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getNameByID($I_id)
|
public function getUsernameByID($I_id)
|
||||||
{
|
{
|
||||||
$O_model = Model::get();
|
$O_model = Model::get();
|
||||||
$stmt = $O_model->prepare("SELECT NAME FROM USER WHERE ID=:id");
|
$stmt = $O_model->prepare("SELECT USERNAME FROM USER WHERE ID=:id");
|
||||||
$stmt->bindParam("id", $I_id);
|
$stmt->bindParam("id", $I_id);
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user