Skip to content

Commit

Permalink
🐛 #76 removendo esquema de banco
Browse files Browse the repository at this point in the history
  • Loading branch information
bjverde committed Nov 22, 2021
1 parent b300749 commit 8d6f7ea
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/control/controllers/TCreateDAO.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public function addSqlVariable()
foreach ($this->getColumns() as $k => $v) {
$this->addLine($indent.( $k==0 ? ' ' : ',').$v);
}
$this->addLine($indent.'from '.$this->hasSchema().$this->getTableName().' \';');
$this->addLine($indent.'from '.$this->getTableName().' \';');
}
//--------------------------------------------------------------------------------------
/***
Expand Down Expand Up @@ -268,7 +268,7 @@ public function addSqlSelectCount()
$this->addLine(ESP.'public function selectCount( $where=null )');
$this->addLine(ESP.'{');
$this->addLine(ESP.ESP.'$where = $this->processWhereGridParameters($where);');
$this->addLine(ESP.ESP.'$sql = \'select count('.$this->getKeyColumnName().') as qtd from '.$this->hasSchema().$this->getTableName().'\';');
$this->addLine(ESP.ESP.'$sql = \'select count('.$this->getKeyColumnName().') as qtd from '.$this->getTableName().'\';');
$this->addLine(ESP.ESP.'$sql = $sql.( ($where)? \' where \'.$where:\'\');');
$this->addLine(ESP.ESP.'$result = $this->tpdo->executeSql($sql);');
$this->addLine(ESP.ESP.'return $result[0]->QTD;');
Expand Down Expand Up @@ -388,7 +388,7 @@ public function addSqlInsert()
}
}
$this->addLine(ESP.ESP.ESP.ESP.ESP.ESP.');');
$this->addLine(ESP.ESP.'$sql = \'insert into '.$this->hasSchema().$this->getTableName().'(');
$this->addLine(ESP.ESP.'$sql = \'insert into '.$this->getTableName().'(');
$cnt=0;
foreach ($this->getColumns() as $v) {
if ($v != strtolower($this->keyColumnName)) {
Expand Down Expand Up @@ -420,7 +420,7 @@ public function addSqlUpdate()
}
}
$this->addline(ESP.ESP.ESP.ESP.ESP.ESP.',$objVo->get'.ucfirst($this->keyColumnName).'() );');
$this->addLine(ESP.ESP.'$sql = \'update '.$this->hasSchema().$this->getTableName().' set ');
$this->addLine(ESP.ESP.'$sql = \'update '.$this->getTableName().' set ');
$count=0;
foreach ($this->getColumns() as $v) {
if (strtolower($v) != strtolower($this->keyColumnName)) {
Expand All @@ -446,7 +446,7 @@ public function addSqlDelete()
$this->addLine(ESP.'{');
$this->addValidateTypeInt(ESP.ESP);
$this->addLine(ESP.ESP.'$values = array($id);');
$this->addLine(ESP.ESP.'$sql = \'delete from '.$this->hasSchema().$this->getTableName().' where '.$this->keyColumnName.' = '.$this->charParam.'\';');
$this->addLine(ESP.ESP.'$sql = \'delete from '.$this->getTableName().' where '.$this->keyColumnName.' = '.$this->charParam.'\';');
$this->addExecuteSql(true);
$this->addLine(ESP.'}');
}
Expand Down

0 comments on commit 8d6f7ea

Please sign in to comment.