id table – Französisch-Übersetzung – Keybot-Wörterbuch

Spacer TTN Translation Network TTN TTN Login Français English Spacer Help
Ausgangssprachen Zielsprachen
Keybot 4 Ergebnisse  book.cakephp.org
  Virtual fields  
public function __construct($id = false, $table = null, $ds = null) { parent::__construct($id, $table, $ds); $this->virtualFields['name'] = sprintf( 'CONCAT(%s.first_name, " ", %s.last_name)', $this->alias, $this->alias ); }
$results = $this->User->find('first'); // les résultats contiennent le tableau suivant array( 'User' => array( 'prenom' => 'Mark', 'nom_famille' => 'Story', 'nom' => 'Mark Story', //plus de champs. ) );
  Retrieving Your Data  
$conditionsSubQuery['"User2"."status"'] = 'B'; $db = $this->User->getDataSource(); $subQuery = $db->buildStatement( array( 'fields' => array('"User2"."id"'), 'table' => $db->fullTableName($this->User), 'alias' => 'User2', 'limit' => null, 'offset' => null, 'joins' => array(), 'conditions' => $conditionsSubQuery, 'order' => null, 'group' => null ), $this->User ); $subQuery = ' "User"."id" NOT IN (' . $subQuery . ') '; $subQueryExpression = $db->expression($subQuery); $conditions[] = $subQueryExpression; $this->User->find('all', compact('conditions'));
$conditionsSubQuery['"User2"."status"'] = 'B'; $db = $this->Utilisateur->getDataSource(); $subQuery = $db->buildStatement( array( 'fields' => array('"User2"."id"'), 'table' => $db->fullTableName($this->User), 'alias' => 'User2', 'limit' => null, 'offset' => null, 'joins' => array(), 'conditions' => $conditionsSubQuery, 'order' => null, 'group' => null ), $this->User ); $subQuery = ' "User"."id" NOT IN (' . $subQuery . ') '; $subQueryExpression = $db->expression($subQuery); $conditions[] = $subQueryExpression; $this->User->find('all', compact('conditions'));