| @@ 169-175 (lines=7) @@ | ||
| 166 | *  | 
                                |
| 167 | * @return ActiveRecord  | 
                                |
| 168 | */  | 
                                |
| 169 | public static function firstBy($field, $value, $params = [])  | 
                                |
| 170 |     { | 
                                |
| 171 | $field = self::sqlItemSanitize($field);  | 
                                |
| 172 | $params['where'] = "$field = ?";  | 
                                |
| 173 | ||
| 174 | return self::first($params, $value);  | 
                                |
| 175 | }  | 
                                |
| 176 | ||
| 177 | /**  | 
                                |
| 178 | * Obtener la primera coincidencia de las condiciones indicadas.  | 
                                |
| @@ 287-293 (lines=7) @@ | ||
| 284 | *  | 
                                |
| 285 | * @return \PDOStatement  | 
                                |
| 286 | */  | 
                                |
| 287 | public static function allBy($field, $value, $params = [])  | 
                                |
| 288 |     { | 
                                |
| 289 | $field = self::sqlItemSanitize($field);  | 
                                |
| 290 | $params['where'] = "$field = ?";  | 
                                |
| 291 | ||
| 292 | return self::all($params, $value);  | 
                                |
| 293 | }  | 
                                |
| 294 | ||
| 295 | /**  | 
                                |
| 296 | * Cuenta los registros que coincidan con las condiciones indicadas.  | 
                                |