Issue with formating a query broken into columns
Hello;
I have 2 issues actually. I'm breaking my query down into 2 columns. That all works, it's outputting it and everyhting looks nice... But now, I'm trying to do a little formating to the code to make things look correct (the out put data) and I'm not getting the proper information for some reason.. Can someone help me figure out what I need to do?
This is my code for the query, and the columns, this all works:
<cfquery name="GetList" datasource="#APPLICATION.dataSource#" dbtype="ODBC">
SELECT liveVideo.ID AS ID, liveVideo.title, liveVideo.MYVideo, liveVideo.fileURL, liveVideo.MYFile, liveVideo.Body, liveVideo.dateDD
FROM liveVideo
ORDER BY liveVideo.dateDD
</cfquery>
<cfset halfrecords = GetList.RecordCount/2>
<table width="90%" border="0" cellspacing="0" cellpadding="0">
<cfoutput query="GetList">
<tr>
<cfif CurrentRow lte halfrecords>
<td width="40%" align="center" valign="top">
<div align="center">
<p><img src="../images/live/#GetList.MYFile[CurrentRow]#" width="100" border="0" /></p></div>
</td>
</cfif>
<cfif Evaluate(CurrentRow+halfrecords) lte GetList.RecordCount>
<td width="50%" align="center" valign="top">
<div align="center">
<p><img src="../images/live/#GetList.MYFile[Evaluate(CurrentRow+halfrecords)]#" width="100" border="0" /></p></div>
</td></cfif>
<td width="40%" align="center" valign="top"> </td>
</tr>
</cfoutput>
</table>
My first issue is to try and get the date to show up like this January 12, 2010 When I try and set the formatting, it doesn't like how I'm coding it...I tried this, and a few other variations.. isn't there a better way, like making a cfset change it and then use the name of the set in the output instead of the dateformat? this is the experimental non working code: #GetList.dateformat(dateDD[CurrentRow],'mm/dd/yyyy')#
Also, I can 't seem to use cf to find out if a db cell has data in it, this code works on a normal query or a loop, but I can't get it to work with breaking up a query like this...
<cfif isDefined("GetList.fileURL")>#GetList.fileURL[Evaluate(CurrentRow+halfrecords)]#</cfif> - Doesn't work
<cfif isDefined("GetList.fileURL")> - desn't work
I realize, I need to look at each column, so I need to make the if statememnt work for how the rcords are being broken down...Can anyone help me with the logic here?
Thank you.
