lib/Face/Traits/EntityFaceTrait.php
public static function faceQueryBy($item, $itemValue, $pdo)
    {
        if (self::getEntityFace()->getDirectElement($item)) {
            $fQuery = self::faceQueryBuilder();

            if (is_array($itemValue)) {
                $fQuery->whereIN("~$item", $itemValue);
            } else {
                $fQuery->where("~$item=:itemValue")
                       ->bindValue(":itemValue", $itemValue);
            }

            return ORM::execute($fQuery, $pdo);

        }
    }
public static function faceQueryBy($item, $itemValue, $pdo)
    {
        if (self::getEntityFace()->getDirectElement($item)) {
            $fQuery = self::faceQueryBuilder();

            if (is_array($itemValue)) {
                $fQuery->whereIN("~$item", $itemValue);
            } else {
                $fQuery->where("~$item=:itemValue")
                       ->bindValue(":itemValue", $itemValue);
            }

            return ORM::execute($fQuery, $pdo);

        }
    }
public static function faceQueryBy ( $ item , $ itemValue , $ pdo ) { if ( self :: getEntityFace ( ) -> getDirectElement ( $ item ) ) { $ fQuery = self :: faceQueryBuilder ( ) ; if ( is_array ( $ itemValue ) ) { $ fQuery -> whereIN ( "~$item" , $ itemValue ) ; } else { $ fQuery -> where ( "~$item=:itemValue" ) -> bindValue ( ":itemValue" , $ itemValue ) ; } return ORM :: execute ( $ fQuery , $ pdo ) ; } }
Fast querying by only specifying one field
@param $item string name of the item (without the leading tild) e.g : "id"
@param $itemValue string|array value to find. You may specify an array to use an WHERE item IN (...) instead of WHERE item = ...
@param $pdo
@return \Face\Sql\Result\ResultSet
Fast querying by only specifying one field