I'm trying to display some text on my page depending on two conditions. If a DATE field in my table is empty or is 0000-00-00, then show "No Date". The code below works fine if the field is Empty, but how do I also make it check if the field contains 0000-00-00? Basically I guess I want to stick an "OR" in the code with another condition after it.
<?php if ($row_rs_view_coreitems['core_modified']==""){ ?> No Date <?php } ?>
Thanks for your help!
should this do what you want?
<?php if ($row_rs_view_coreitems['core_modified'] == "" || $row_rs_view_coreitems['core_modified'] == "0000-00-00") { echo "No Date"; } ?>
What laserlight wrote will work, but here is another alternative. Same premise, just less code.
<?php if ($row_rs_view_coreitems['core_modified'] <= "0000-00-00") { echo "No Date"; }
That should work (I haven't tested it though).