I was successfully using the following block of code until I upgraded to EE 2.9.0.
{exp:query sql="SELECT COUNT( * ) AS itemCount FROM exp_freeform_form_entries_4 WHERE form_field_52 = 'yes'"}
{if 15 > {itemCount}}
<td><label for="setup_1">Mon. Dec. 9, Setup/iron - 9am-noon: {exp:query sql="SELECT 15 - COUNT( * ) AS itemNeeded FROM exp_freeform_form_entries_4 WHERE form_field_52 = 'yes'"}{itemNeeded}{/exp:query} needed </label>
<input type="checkbox" name="setup_1" id="setup_1" value="Yes" /></td>
{if:else}
<td>Monday 9-noon is full</td>
{/if}
{/exp:query}
Now however I get the following error message when I try and load the page:
Error
You have an invalid conditional in your template. Please review your conditionals for an unclosed string, invalid operators, a missing }, or a missing {/if}.
Parser State: Unexpected end of Template “apex/volunteer-form” on line 2; expected ENDIF tag for opening on line 1.
I have carefully checked the page and don't see any missing {/if} or }. Any suggestions for what I am missing here?