Here is my MSQL Query that calls the layout:


[CODE]
<%
'DIM mySQL
'mySQL = "SELECT * FROM Content ORDER BY DateAdded DESC"
mySQL1 = "SELECT TOP 5 Newsinstances.*, Content.*, contenttypes.* FROM (Newsinstances LEFT JOIN Content ON Newsinstances.newsid = Content.Catid) LEFT JOIN contenttypes ON Newsinstances.sectionid = contenttypes.contenttypeid WHERE Newsinstances.location='R' AND Newsinstances.DisplayNews=1 AND Newsinstances.sectionID = 1 AND Contenttypes.ContenttypeID=newsinstances.sectionid ORDER BY Content.DateAdded DESC"

Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open mySQL1, objConn
%>

Now I want this area
to only show up when the DisplayNews is set to displaynews=1.

<table class='SectionHeadTableNewsSUB'>
<tr>

<td class='FeatureHeadTDleftnewscolSUB'><span class="FeatureHeadTDleftnewstitle">NSE NEWS on</span></td>


This is the only area tha that need to loop and not the top of the table. Only the body.

I want only this area to loop
<table class='FeatureTable' >




<tr>
<td class="SectionTableNewsTD"

<%
'Dim x, bgcolor
if x = 1 then
bgcolor="#3B73AE"
response.write "bgcolor='#CED5DA' "
x=2
Else
bgcolor="#E9E9E9"
Response.write "bgcolor='#E9E9E9' "
x=1
End if %>>






<a href="content.do?contentid=<% =objRS("ContentId") %>" class='SectionFontNews' alt='<% =objRS("Title") %>'
> <%= Left(objRS("Title"), 30)%> </a>
</td>




</tr>
<%
iRecordCount = iRecordCount + 1
objRS.MoveNext
Loop

objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%>