cfoutput

Having trouble with a SQL Join in ColdFusion

一曲冷凌霜 提交于 2019-12-25 08:00:00
问题 I'm trying to do something very simple in CF/SQL but just can't seem to figure out what I am doing wrong. I have these tables: movies genres actors moviesGenres moviesActors ------ ------ ------ ------------ ------------ movieId genreId actorId id id title name fname movie movie lname genre actor I'm trying to write a query that simply lists all movies, with each movie's genre (multiple selections possible) and each movie's actors (again, multiple selections possible). When I write the query

define a list of id's for grouped item

时光总嘲笑我的痴心妄想 提交于 2019-12-20 05:38:29
问题 i got a little question, i just can't understand, what is the problem and how do i solve it, i have a coldfusion variable, for example #account_code# , first of all, this code looks like this: 100.001.001 (there are bunch of them of cource) and i have some values for this variable, like sum(nettotal) and the cfquery i grouped by this #account_code# , all i want is to set the list of these codes, thus i define list, for example <cfset code_list='100.001.001,100.001.002'> and in query: account

Remove characters in <cfoutput> with ReplaceNoCase() ColdFusion

陌路散爱 提交于 2019-12-11 13:56:39
问题 I need to display an output from a data record that is formatted similar to this: XXXX:12345 (Xxxxxxxxx) However, the only data I want to output is the "12345" and with two preceding zeros, i.e. the output should look like "0012345". The "12345" in the record is example only, each record has a unique number assigned. An example record looks like this: CAST:98765 (RPOS1234-XY) Can I use the ReplaceNoCase() to pull only that data out of the record? If so, how would I write the code to remove

count total records for each user

风格不统一 提交于 2019-12-11 06:05:51
问题 I have this code that pulls all users with open requests. I need to show a total for each assigned buyer. <CFQUERY NAME="allbuyers" DATASOURCE="procuresource3"> SELECT * FROM allorders3 WHERE open = 'y' order by assignedbuyer </cfquery> <cfoutput query="allbuyers"> #assignedbuyer# #prn# </cfoutput> <cfoutput> Total: #allbuyers.RecordCount# </cfoutput> The output is all records. I need a total for each user. Something like this below: Christine - 301366 Christine - 300729 Christine - 300731

How to find the nested cfoutput recordcount when using group

痞子三分冷 提交于 2019-12-11 03:36:13
问题 Consider the following: <cfoutput query="resources" group="type"> <h4>#type#</h4> <cfoutput> #name# </cfoutput> </cfoutput> resources.recordcount would give me the total number of records, but is there an elegant way of finding out the recordcount of the nested data? e.g <cfoutput query="resources" group="type"> <h4>#type# (#noofrecords# of #resources.recordcount#)</h4> <cfoutput> #name# </cfoutput> </cfoutput> I could probably do something hacky with loops, but wondered if there was a way of

define a list of id's for grouped item

南笙酒味 提交于 2019-12-02 04:27:52
i got a little question, i just can't understand, what is the problem and how do i solve it, i have a coldfusion variable, for example #account_code# , first of all, this code looks like this: 100.001.001 (there are bunch of them of cource) and i have some values for this variable, like sum(nettotal) and the cfquery i grouped by this #account_code# , all i want is to set the list of these codes, thus i define list, for example <cfset code_list='100.001.001,100.001.002'> and in query: account_code in (#code_list#) i also tried this one account_code in ('#code_list#') but instead it gives out

How to output table results by using cfoutput group by date?

依然范特西╮ 提交于 2019-11-30 09:49:26
问题 I have a query that get the all the employees count in a table: emp_namelast | emp_namefirst | employeetotal | year_cse1 -------------------------------------------------------- smith | john | 13 | 2014 smith jr | jonnny | 10 |2014 baker |jane |5 |2015 doe |john |6 |2015 I'm outputting the results in a table. I have the results in order from the query. But with the code below it's outputting the top result from 2014 and then the top result from 2015. I have tried using no group , which gives

How to output table results by using cfoutput group by date?

纵饮孤独 提交于 2019-11-29 16:26:39
I have a query that get the all the employees count in a table: emp_namelast | emp_namefirst | employeetotal | year_cse1 -------------------------------------------------------- smith | john | 13 | 2014 smith jr | jonnny | 10 |2014 baker |jane |5 |2015 doe |john |6 |2015 I'm outputting the results in a table. I have the results in order from the query. But with the code below it's outputting the top result from 2014 and then the top result from 2015. I have tried using no group , which gives me all the data from the query. I would like it to output the data from 2014 and 2015 in two different