0
I’m conducting a consultation, where it contains a clause Where where the flag Status is to be applied during implementation.
But the result always comes, ignoring my clause.
Veiculo::find()->select([Veiculo::tableName() . '.id', "CONCAT(descricao, ' - ', placa) AS text"])
->innerJoin(ModeloVeiculo::tableName(), ModeloVeiculo::tableName() . '.id = ' . Veiculo::tableName() . '.fk_modelo_veiculo')
->where(['<>',Veiculo::tableName() . '.status' , 4])
->andWhere(['like', 'placa', $q])
->orWhere(['like', 'descricao', $q])->funcaoFilter()->asArray()->all();
->Where(['!=',Vehicle::tableName() . '.status' , 4]) // Flag to filter vehicles with different status of type 4
I imagine the code is PHP, but to avoid problems, would be good you [Edit] the post and add the language tag.
– Jéf Bueno