|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
SteveJ Smarty n00b
Joined: 04 Mar 2016 Posts: 3
|
Posted: Fri Mar 04, 2016 8:34 pm Post subject: Handling Null |
|
|
Hello bit of a newbie question, but I'm trying to handle a database field that is returning null.
Code: |
{foreach from=$Grid.Row item=Cell}
{if $Cell.Caption == "Q"}{assign var=q value=$Cell.DisplayValue|default:'x'}{/if}
{/foreach}
|
The idea being is that if the field is null then q is set to x, but it isn't working. Is there some other function I should be using.
SteveJ[/code] |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Sat Mar 05, 2016 8:44 am Post subject: |
|
|
Why not do that in the SQL query? |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|