I have tried the following variations but non works
if($row['relation'] = "" ){
if($row['relation'] = '' ){
if($row['relation'] = NULL ){
if($row['relation'] IS NULL ){
if(strlen($row['relation']) = 0 ){
So how would one refer to a cell that is empty?
How does one refer to empty cells in mysql?
Moderator: General Moderators
Re: How does one refer to empty cells in mysql?
The first mistake that I see is that you are using assignment operators ( = ) instead of comparison operators ( == ). Additionally, if you want to see what a variable contains, why not use var_dump()?
Re: How does one refer to empty cells in mysql?
if($row['relation'] == "" ){
will work
will work
Re: How does one refer to empty cells in mysql?
if(empty($row['relation'])) {