'How to get empty column and null columns in laravel?
I have a column with null values in it and one is empty. Now I am trying to fetch both but it shows me an SQL syntax error. Please guide me on how can i fetch both empty and null columns.
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',,,,,,42450,42706,42962,43218,43474,43730,43994,44250,44506,44762,45018,45274,45' at line 1 (SQL: select token_id
, email_state, email_event_time, created_at as email_created_at from email_tracker where transaction_id = 2856 and email_tracker.id IN (SELECT max(id) FROM email_tracker WHERE token_id IN (,,,,,,,42450,42706,42962,43218,43474,43730,43994,44250,44506,44762,45018,45274,45530,45793,46049,46305,46561,46817,47073,47329,47585,47841,48097,48353,48609,48880,49136,49392,49648,49904,50160,50700,50956,51212,51468,51724,51980,52236,52492,52748,53004,53260,53516) GROUP BY token_id) order by created_at desc)
$this->replies->where($field_name,'=', '')->orWhereNull($field_name);
Please guide me on what I am doing wrong here.
Any solution appreciated!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

