Removed minor bug and implemented stub of first class

This commit is contained in:
2019-05-22 14:22:45 +02:00
parent cb6068bfd6
commit b3e28d7884
6 changed files with 65 additions and 5 deletions

View File

@@ -94,7 +94,8 @@ abstract class AbstractCommonClubsModel
foreach($attribs as $k => $v)
{
$q->select($q->qn($v['col'], $k));
$rawColName = isset($v['col']) ? $v['col'] : $k;
$q->select($q->qn($rawColName, $k));
}
$q->from($factory->getTableName());
$q->where("id = {$this->id}");
@@ -253,7 +254,11 @@ abstract class AbstractCommonClubsModel
{
$q->insert($factory->getTableName());
$dbcols = array_map(function ($v){return $v['col'];}, $attribs);
$dbcols = array();
foreach($attribs as $k => $v)
{
$dbcols[] = isset($v['col']) ? $v['col'] : $k;
}
$q->columns($q->qn($dbcols));
@@ -282,7 +287,9 @@ abstract class AbstractCommonClubsModel
{
$q->update($factory->getTableName());
$dbcols = array_map(function ($v){return $v['col'];}, $attribs);
$dbcols = array();
foreach($attribs as $k => $v)
$dbcols[] = isset($v['col']) ? $v['col'] : $k;
$quotedData = $this->getQuotedData($attribs, $q);