php - SQL field value of 0 returns empty -


I have variable types of data in the SQL database, and I am populating the table with PHP.

Sometimes I have 3 columns, sometimes I have more depending on the type of data I use if:

  $ fourth column = $ Row ['fourth']; If (empty ($ fourth column)) {// nothing} other {resonant "  

Then it works as expected with a single exception: some columns are quantities when the quantity is '0', then it is returning empty and with the value of '0' TD does not make.

In my composition, if there is no information, the cell is completely empty, and that is what I hope to return to empty form

What '0' Is there any way to return? What am i doing wrong

blank (0) evaluates correctly Php

so that you can clearly check

  if (empty (fourth column) & amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; fourth column! == 0 & amp; amp;; fourth column! == "0") {// nothing} other {resonant "& lt; td class = 'fourth' & gt; . $ Fourthcolumn "& Lt; / td & gt;"; }    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -