show $ if / insert inserts 0 vs null
For some reason the value 0 is getting inserted when a new record is added.
The price field is type double in my database (not sure why - what does double mean), length is 25, decimals 0, and allow null and I have the default as null so I don't know why 0 is getting inserted.
I resolved the display problem by changing my showif from
<?php
if ($row_WADAtbl_posts['price'] != '0') {
?>
</strong>$ <?php echo $row_WADAtbl_posts['price']; ?>
<?php
}
?>
to <?php
if ($row_WADAtbl_posts['price'] != '0' && $row_WADAtbl_posts['price'] !='' ) {
?>
but I am still curious as to why 0 is getting inserted.