xPDOQuery.andCondition
Последнее обновление Jan 28th, 2020 | История страницы | Улучшить эту страницу | Сообщить о проблеме
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$311 per month—let's make that $500!
Learn morexPDOQuery::andCondition¶
Добавьте условие AND
в предложение WHERE
.
Синтаксис¶
API Docs: xPDOQuery::andCondition()
void andCondition ( $conditions, [ $binding = null], [ $group = 0])
Пример¶
Возьмите все коробки шириной 12 и высотой 4.
$query = $xpdo->newQuery('Box');
$query->where(array('width' => 12));
$query->andCondition(array('height' => 4));
$boxes = $xpdo->getCollection('Box',$query);
Предупреждение Порядок вызова функций важен! andCondition должно следовать после where, где метод был использован.
Смотрите также¶
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$311 per month—let's make that $500!
Learn more