mysql query advanced and :label(s)

2 posts by 2 authors in: Forums > CMS Builder
Last Post: July 3, 2014   (RSS)

By mizrahi - July 1, 2014

I am trying to use an advanced mysql query with a list, but the field I am referencing is also a list and the query is returning the values, rather than the labels. See query below. Is there any to show the labels instead?

Current:
<?php $numValue = (@$ESCAPED_FILTER_VALUE )? $ESCAPED_FILTER_VALUE : '0'; ?>
SELECT num, CONCAT(clientname,' / ',title)
FROM `<?php echo $TABLE_PREFIX ?>portfolio_projects`
WHERE num != <?php echo $numValue; ?>

Idea that doesn't work:
<?php $numValue = (@$ESCAPED_FILTER_VALUE )? $ESCAPED_FILTER_VALUE : '0'; ?>
SELECT num, CONCAT(clientname:label,' / ',title)
FROM `<?php echo $TABLE_PREFIX ?>portfolio_projects`
WHERE num != <?php echo $numValue; ?>