Skip to content

Instantly share code, notes, and snippets.

@MissAllSunday
Created March 20, 2014 18:33
Show Gist options
  • Save MissAllSunday/9670734 to your computer and use it in GitHub Desktop.
Save MissAllSunday/9670734 to your computer and use it in GitHub Desktop.
if (substr($field, 0, 5) == 'cust_' && isset($context['custom_search_fields'][$row['col_name']]))
{
$customJoin[] = 'LEFT JOIN {db_prefix}themes AS t' . $row['col_name'] . ' ON (t' . $row['col_name'] . '.variable = {string:t' . $row['col_name'] . '} AND t' . $row['col_name'] . '.id_theme = 1 AND t' . $row['col_name'] . '.id_member = mem.id_member)';
$query_parameters['t' . $row['col_name']] = $row['col_name'];
$fields += array($customCount++ => 'IFNULL(t' . $row['col_name'] . '.value, {string:blank_string})');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment