Example #1
0
 /**
  * Query using IN operator
  * @return <type>
  */
 public function criteriaCommand10()
 {
     $logins = new \OperandArray(array('abc', 'cde', 'fgf'));
     $criteria = $this->getCriteria("select login " . "where login IN " . $logins->getSql());
     return $criteria;
 }
Example #2
0
 public function getUpdateStatementId($object, $id, $value = NULL)
 {
     // $id = array com PK dos objetos associados
     $statement = new \Maestro\Database\MSQL();
     $statement->setDb($this->fromClassMap->getDb());
     $statement->setTables($this->toClassMap->getTableName());
     $a = new OperandArray($id);
     $statement->setColumns($this->toAttributeMap->getName());
     $whereCondition = $this->toClassMap->getKeyAttributeName() . ' IN ' . $a->getSql();
     $statement->setWhere($whereCondition);
     //$statement->setParameters($object->getOIDValue());
     $statement->setParameters($value);
     return $statement->update();
 }