I have a loop (below), which pulls companies that are “Market Making”. Basically, if they have a company_type (P&T Dropdown), then the company is Market Making and displays in the list. But that’s not all that makes a company Market Making. It also depends on a cell in a MSSQL database. If it’s Market Making, then the market_making cell in the MSSQL database has the value “Y”.
So, here’s the EE entries code:
<section>
<ul class="content_list">
{exp:channel:entries channel='companies' search:company_type='not none' search:company_rating='buy|high_yield-buy|neutral' dynamic='no' orderby='company_name' sort='asc|desc' paginate='bottom' limit='25'}
<li class="{switch='odd|even'}">
<div>
<span class="company_name"><a href="http://{title_permalink=research/coverage_list}/">{company_name}</a></span>
<span class="company_symbol">{company_symbol}</span>
<span class="company_rating
{if company_rating == 'buy' OR company_rating == 'high_yield-buy'}
buy
{if:elseif company_rating == 'neutral' OR company_rating == 'high_yield-neutral'}
neutral
{if:elseif company_rating == 'sell' OR company_rating == 'high_yield-sell'}
sell
{if:else}
none
{/if}
">{company_rating}</span>
<span class="company_type">
{if company_type == 'amex'}
AMEX
{if:elseif company_type == 'bulletin_board'}
Bulletin Board
{if:elseif company_type == 'nasdaq_capital_market'}
NASDAQ Capital Market
{if:elseif company_type == 'nasdaq_global_market'}
NASDAQ Global Market
{if:elseif company_type == 'nasdaq_national_market'}
NASDAQ National Market
{if:elseif company_type == 'non-nasdaq_over-the-counter'}
Non-NASDAQ Over-the-Counter
{if:elseif company_type == 'nsc'}
NSC
{if:elseif company_type == 'nyse'}
NYSE
{if:elseif company_type == 'otcqx'}
OTCQX
{if:elseif company_type == 'pink_sheets'}
Pink Sheets
{if:elseif company_type == 'none'}
None
{if:else}
Other
{/if}
</span>
</div>
</li>
{paginate}
<div class="paginate">
Page {current_page} of {total_pages} page{if total_pages > '1'}s{/if} | {pagination_links}
</div>
{/paginate}
{/exp:channel:entries}
</ul>
</section>
I have someone coming over tonight that knows a lot more about databases than I do, but I basically need to do this, which I wrote in some kind of phonetic language I made up.
{exp:channel:entries channel='companies' search:company_type='not none' search:company_rating='buy|high_yield-buy|neutral' dynamic='no' orderby='company_name' sort='asc|desc' paginate='bottom' limit='25'}
{if MSSQL DATABASE (company) COLUMN (market_making) has value 'Y'}
...show the companyThis possible? I also use the {switch} tag and if I use an {if} statement, it’s mess that up. Hm.