I have a query with quite a few fields, and I want to loop through them to do additional queries to get specific values from each.
Is there any way to loop through query fields like looping through form fields in a collection?
Any help would be greatly appreciated!
(anyone else notice that...
I'm testing in NS 4.08. Maybe no one even uses that one anymore... The *** drop down text *** appears when I mouseover the image, but when I move down to the text, where links will be eventually, it dissapears, cause the mouse events in the span tag seem to be ignored.
I'm making a dhtml drop down menu, and while it works flawlessly in IE, it's giving me trouble in Netscape (go figure). The problem is if I move off of the image that makes the drop down appear, and onto the drop-down itself, it dissapears. I have onmouseover and onmouse events on both the...
Alright... I'm completely lost... I don't know what I'm doing. I have a select list, and depending on which option is selected, a different second select list will be "displayed" on the site. Here's what I have so far, and it doesn't do anything.
in header:
<script...
I'm trying to sort a query by a calculated field, but it's giving me a "field doesn't exist" error. Is there a special way of doing this?
My example (Coldfusion):
SELECT *, (#Now()# - target_completion) AS days_left FROM TJob ORDER BY days_left
target_completion is a date field. I...
heh... well, what's really weird, is I took the code from an example in the manual, and tested it. It also gave an incorrect value...
Maybe this function is bugged?
I'm using the FirstDayOfMonth function to help create a calendar, but it doesn't seem to return the correct day. If I use:
#DayOfWeek(FirstDayOfMonth(Now()))#
to get the day of the week for the current month (may), and it returns 2 (monday) when it should be 4 (wednesday).
I must be doing...
Thanks CFHUb, that worked great.
Thanks WWebSpider as well, although I couldn't use that method, because I needed individual counts for each distinct, as well as a total.
I'm trying to use arraysum with a query column to get the sum of all the values, but it just sees the first value, instead of an array. Is there some special way to do this?
My code:
<cfquery name="get_results1" datasource="xxx">
SELECT DISTINCT(q1), COUNT(q1) AS q_count...
oh i just thought of it.
distinct(field) as mydistinctfield, count(field) as fieldcount from mytable group by mydistinctfield?
I can't test it out yet cause I'm waiting for datasources...
Is it possible to do a SELECT DISTINCT, to select all distinct records, but also select how many of each distinct record there are?
table data like:
1, cat
2, dog
3, cat
4, dog
5, dog
and get a recordset with:
cat, 2
dog, 3
thanks in advance for any help.
I'm trying to validate an e-mail address by checking for an @ symbol, but it doesn't seem to be finding it. The following code:
<cfoutput>#email# #Find(email, "@")#</cfoutput>
yields the following result:
email@email.ca 0
which doesn't make a lot of sense to me. Am I doing...
thanks for the help, but I gave up and took an easier path. just selected all of the records, matching and all, then used code to check for the unmatched ones.
I've seen this done so many times, and now I can't remember how it's done.
I have two tables, linked with a common field, and I want to select everything from the first table that doesn't have any matching records in the second table.
A quick example would be greatly appreciated. Thanks in...
ohhh... thanks for the response, but I don't think I have access to the server to install custom tags and such. I'll just see about finding a better way to do this.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.