Update image path

This commit is contained in:
sctn4elk 2024-06-03 13:50:27 -05:00
parent fc0237ef43
commit 9454412239
2 changed files with 23 additions and 4 deletions

View File

@ -78,6 +78,12 @@ class AttributeController extends BaseController {
$this->arrQueryStringParams = $this->getQueryStringParams();
if (isset($this->arrQueryStringParams['loyalty_attribute_name'])) {
$this->attributeModel->attributeName = $this->arrQueryStringParams['loyalty_attribute_name'];
$this->attributeModel->memberId = $this->arrQueryStringParams['loyalty_member_id'];
return $this->attributeModel->findMemberAttributeByAttrName();
}
if (isset($this->arrQueryStringParams['loyalty_member_id'])) {
$response = $this->selectByMemberIdAction();
} else {

View File

@ -14,20 +14,33 @@ class AttributeModel extends Database {
public function findAllAttributes()
{
return $this->processQuery("SELECT * FROM loyalty_attribute ORDER BY loyalty_attribute_id ASC");
$response = $this->processQuery("SELECT * FROM loyalty_attribute ORDER BY loyalty_attribute_id ASC");
return $response;
}
public function findAttributesByMemberId()
{
return $this->processQuery("SELECT * FROM loyalty_member_view WHERE loyalty_member_id = ?", ["i", $this->memberId]);
$response = $this->processQuery("SELECT * FROM loyalty_member_view WHERE loyalty_member_id = ?", ["i", $this->memberId]);
return $response;
}
public function findMemberAttribute()
public function findMemberAttributeByAttrId()
{
$query = "SELECT * FROM loyalty_member_view WHERE loyalty_member_id = " . $this->memberId;
$query .= " AND loyalty_attribute_id = " . $this->attributeId;
return $this->processQuery($query);
$response = $this->processQuery($query);
return $response;
}
public function findMemberAttributeByAttrName()
{
$query = "SELECT loyalty_attribute_id FROM loyalty_attribute WHERE loyalty_attribute_name = '" . $this->attributeName . "'";
$data = $this->processQuery($query);
$this->attributeId = $data[0]['loyalty_attribute_id'];
$response = $this->findMemberAttributeByAttrId();
return $response;
}
public function insertAttribute($inputModel)