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? Quote 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..... Quote 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) {} Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.