Richzilla Posted May 12, 2007 Share Posted May 12, 2007 I have a database with a few cells that are blank. I want to only show those that have a value in them. SO i thought that using the following statement would help - if ($download1 != "") { code } What do i have to put in the "" to make sure that only downlaods with a link will get displayed? Is there another way of perfroming the same function? Quote Link to comment https://forums.phpfreaks.com/topic/51080-solved-selecting-values-that-are-not-null/ Share on other sites More sharing options...
john010117 Posted May 12, 2007 Share Posted May 12, 2007 if ($download1 != NULL) { code } Quote Link to comment https://forums.phpfreaks.com/topic/51080-solved-selecting-values-that-are-not-null/#findComment-251424 Share on other sites More sharing options...
redbullmarky Posted May 12, 2007 Share Posted May 12, 2007 even shorter, you can generally get away with just: <?php if ($download1) { } ?> which will handle empty, null and zero values for $download1 Quote Link to comment https://forums.phpfreaks.com/topic/51080-solved-selecting-values-that-are-not-null/#findComment-251426 Share on other sites More sharing options...
Richzilla Posted May 12, 2007 Author Share Posted May 12, 2007 Thnaks for the swift repiles, however both ways are causing my broswer to lock up and timeout. However I think this is due to the sheer amount of data what i'm trying to display. I think i need to shorten the table size. thanks chaps it looks like iot works Quote Link to comment https://forums.phpfreaks.com/topic/51080-solved-selecting-values-that-are-not-null/#findComment-251431 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.