franco Posted April 25, 2006 Share Posted April 25, 2006 I am building an html table that lists about 50 records worth of date from a database. The database has a lot of blank (null) fields. In my html table, I would like to make all of those fields show 0 instead of just being blank. What would be the easiest way to do this? Quote Link to comment https://forums.phpfreaks.com/topic/8320-zero-in-place-of-null/ Share on other sites More sharing options...
fenway Posted April 25, 2006 Share Posted April 25, 2006 Well, you can either handle this in MySQL with IFNULL(), but this won't be clean if you have many NULL-able columns. Otherwise, do it in PHP on the way out. Quote Link to comment https://forums.phpfreaks.com/topic/8320-zero-in-place-of-null/#findComment-30654 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.