예제 #1
0
 /**
  * Combined all the parts into one sql.
  * @return string Created query.
  */
 protected function generate()
 {
     return 'UPDATE ' . ($this->getPart(CmdUpdate::PART_IGNORE) ? 'IGNORE ' : '') . $this->getPart(CmdUpdate::PART_TABLE) . ' ' . Assembly::appendSet($this->getPart(CmdUpdate::PART_SET), true) . Assembly::appendWhere($this->getPart(CmdUpdate::PART_WHERE), true) . Assembly::appendOrderBy($this->getPart(CmdUpdate::PART_ORDER_BY)) . Assembly::appendLimit($this->getPart(CmdUpdate::PART_LIMIT), $this->getBind(CmdUpdate::PART_LIMIT));
 }
예제 #2
0
 /**
  * Combine all the parts into one sql.
  * @return string Created query.
  */
 protected function generate()
 {
     return 'DELETE FROM ' . $this->getPart(CmdDelete::PART_FROM) . ' ' . Assembly::appendWhere($this->getPart(CmdDelete::PART_WHERE), true) . Assembly::appendOrderBy($this->getPart(CmdDelete::PART_ORDER_BY)) . Assembly::appendLimit($this->getPart(CmdDelete::PART_LIMIT), $this->getBind(CmdDelete::PART_LIMIT));
 }