3 posts by 1 authors in: Forums > CMS Builder
Last Post: January 15, 2013   (RSS)

By weblm - January 9, 2013

Figured it out....well actually Deborah did  ;-)  I referenced this thread:

http://www.interactivetools.com/forum/forum-posts.php?postNum=2210978#post2210978

I had to change it from CONCAT to CONCAT_WS to handle the null value of my note field.  

Here's my final query:

SELECT value, CONCAT_WS(" - ",title,note)
FROM `<?php echo $TABLE_PREFIX ?>pricing_seasons`

Hope this can help others.

-Kevin

By weblm - January 15, 2013

Just an update....I change the code a bit because what was happening was.....if I edited a season record....and didn't have a note, it would still add the separator.  So a season would look like this:   Low Season - 

To change that I modified the code to this:

SELECT value, CONCAT_WS(" - ",title,NULLIF(note, ''))
FROM `<?php echo $TABLE_PREFIX ?>pricing_seasons`

-Kevin