Skip to content

Commit

Permalink
Task: quote channel
Browse files Browse the repository at this point in the history
  • Loading branch information
kingjia90 authored and mattamon committed Jan 17, 2023
1 parent 5a2ada6 commit 9c114b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/OutputDefinition/Dao.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function init()
*/
public function getByO_IdClassIdChannel($o_id, $classId, $channel)
{
$outputDefinitionRaw = $this->db->fetchRow('SELECT * FROM ' . self::TABLE_NAME . ' WHERE o_id=? AND o_classId = ? AND channel = ?', [$o_id, $classId, $channel]);
$outputDefinitionRaw = $this->db->fetchRow('SELECT * FROM ' . self::TABLE_NAME . ' WHERE o_id=? AND o_classId = ? AND ' . $this->db->quoteIdentifier('channel') . ' = ?', [$o_id, $classId, $channel]);
if (empty($outputDefinitionRaw)) {
throw new \Exception('OutputDefinition ' . $o_id . ' - ' . $classId . ' - ' . $channel . ' not found.');
}
Expand Down
2 changes: 1 addition & 1 deletion src/OutputDefinition/Listing/Dao.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function load()

$params = array_column($this->model->getConditionParams() ?: [], 'value');

$unitIds = $this->db->fetchAll('SELECT o_id, id, o_classId, channel FROM ' . OutputDefinition\Dao::TABLE_NAME .
$unitIds = $this->db->fetchAll('SELECT o_id, id, o_classId, ' . $this->db->quoteIdentifier('channel') . ' FROM ' . OutputDefinition\Dao::TABLE_NAME .
$this->getCondition() . $this->getOrder() . $this->getOffsetLimit(), $params);

foreach ($unitIds as $row) {
Expand Down

0 comments on commit 9c114b0

Please sign in to comment.