Copy link to clipboard
Copied
I have thsi code.
<cfquery datasource ="Intranet" name="GetDeptSubmissions">SELECT * FROM CSEReduxResponses</cfquery>
<cfquery dbtype="query" name="GetPending">SELECT * FROM GetDeptSubmissions WHERE status = 1 AND execoffice_status = 0</cfquery>
<cfquery dbtype="query" name="GetApproved">SELECT * FROM GetDeptSubmissions WHERE status = 1 AND execoffice_status = 1</cfquery>
<cfquery dbtype="query" name="GetDenied">SELECT * FROM GetDeptSubmissions WHERE status = 1 AND execoffice_status = 2</cfquery>
<cfoutput>
<h2>Comments / Ratings Administration</h2>
<div>
<div class="display_count pending_outer">
<div class="display_count_desc pending_inner">Pending</div>
<cfif GetPending.RecordCount gt 0><a href="cse_execoffice_pending.cfm"></cfif>
<span class="display_count_number">#GetPending.RecordCount#</span>
<cfif GetPending.RecordCount gt 0></a></cfif>
</div><!--- /div class="display_count" --->
<div class="display_count approved_outer">
<div class="display_count_desc approved_inner">Approved *</div>
<cfif GetApproved.RecordCount gt 0><a href="cse_execoffice.cfm?approved"></cfif>
<span class="display_count_number">#GetApproved.RecordCount#</span><br>
<cfif GetApproved.RecordCount gt 0></a></cfif>
</div><!--- /div class="display_count" --->
<div class="display_count denied_outer">
<div class="display_count_desc denied_inner">Denied</div>
<cfif GetDenied.RecordCount gt 0><a href="cse_execoffice.cfm?denied"></cfif>
<span class="display_count_number">#GetDenied.RecordCount#</span><br>
<cfif GetDenied.RecordCount gt 0></a></cfif>
</div><!--- /div class="display_count" --->
</div>
</cfoutput>
and it works good. in this link is how it looks like http://i.stack.imgur.com/jEV1K.png
This gets all the data from table CSEReduxResponses, I want to create a new one for each month that the data comes in. for example
in table csereduxpesonses there is a column APPROVEDDATE (datetime) ,from this collumn i want to ouput the <div class="display_count pending_outer">for every month. so there will be one for APRIL , MAY , ect.
any suggestion on how to do this or examples would help , thanks
Copy link to clipboard
Copied
I wouldn't know where to start. You know the code better than anyone. So, do the code, and let us make suggestions. That would be far more profitable to you.
Copy link to clipboard
Copied
thats the thing i dont know where to start either. i have trying to google something similar that can give me a idea. I would think it would be a a if statement maybe
Copy link to clipboard
Copied
no_name_123 wrote:
thats the thing i dont know where to start either. i have trying to google something similar that can give me a idea. I would think it would be a a if statement maybe
I don't think you need to google anything. You already have a lot of information, and knowledge, about what you want. Here it is:
and it [given code] works good. in this link is how it looks like http://i.stack.imgur.com/jEV1K.png
This gets all the data from table CSEReduxResponses, I want to create a new one for each month that the data comes in. for example
in table csereduxpesonses there is a column APPROVEDDATE (datetime) ,from this collumn i want to ouput the <div class="display_count pending_outer">for every month. so there will be one for APRIL , MAY , ect.
You have knowledge of these requirements, we don't. The challenge is for you to convert the information into code or even pseudocode. That would make it easier for the rest of us to join in.
Copy link to clipboard
Copied
Dont use "Select * from table". Only return the columns you need. Not doing so can have a major performance impact on your queries and system as a whole.