drayarms Posted May 31, 2011 Share Posted May 31, 2011 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? Link to comment https://forums.phpfreaks.com/topic/237986-how-does-one-refer-to-empty-cells-in-mysql/ Share on other sites More sharing options...
gristoi Posted May 31, 2011 Share Posted May 31, 2011 firstly, what datatype is the relation field ? is it an int, char etc..... Link to comment https://forums.phpfreaks.com/topic/237986-how-does-one-refer-to-empty-cells-in-mysql/#findComment-1222840 Share on other sites More sharing options...
Fadion Posted May 31, 2011 Share Posted May 31, 2011 You'll have to use the comparison operator: == //string datatype if ($row['relation'] == '') {} //numeric datatype if ($row['relation'] == 0) {} Link to comment https://forums.phpfreaks.com/topic/237986-how-does-one-refer-to-empty-cells-in-mysql/#findComment-1222861 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.