If i have employee_id with integer (like 1001) alone, am getting the answer
example the code like this ,
$claimprocess = Employee::find()
->where("employee_id = '1004' and importcompany_id = 1")
->andwhere(" status != 'Deleted' and relationship = 'Self'")
->all();
if i have a employee_id with combination interger and character, am not able get a answer(like E1004),
example code like below,
$claimprocess = Employee::find()
->where("employee_id = 'E1004' and importcompany_id = 1")
->andwhere(" status != 'Deleted' and relationship = 'Self'")
->all();
When I execute this code, am getting error like below
Exception (Database Exception) 'yii\db\Exception' with message 'SQLSTATE[42S22]: Column not found: 1054 Champ 'E1004' inconnu dans where clause The SQL being executed was: SELECT * FROM
employeeWHERE (employee_id = E1004 and importcompany_id = 1) AND ( status != 'Deleted' )'
UPDATED:
actually am getting that value(E1004) from another variable, I use the variable instead of value, for understanding purpose I have used a value there in my question
employee_id = E1004it need to beemployee_id = 'E1004'