RE: Query Help!!

2001-05-11 Thread Hayes, David
I assume session.total is a numeric value; try getting rid of the quotes. -Original Message- From: ibtoad [mailto:[EMAIL PROTECTED]] Sent: Friday, May 11, 2001 3:01 PM To: CF-Talk Subject: Query Help!! Does anyone see any problems with the following query: cfquery

RE: Need help for input type=file

2001-05-07 Thread Hayes, David
No; it would be a bit of a security issue if you could. (Your page could select any file from a user's machine and intiate an upload.) What I did in a previous project was simply display the file name and path near the upload control, with instructions to drag/drop or copy/paste the value in

RE: (sql) Group by Month query

2001-05-07 Thread Hayes, David
The problem is you are still grouping on the specific dateJoined. Try something like SELECT Month(DateJoined) + ' ' + Year(DateJoined) as monthJoined, Count(*) as MonthJoinedCount FROM Admin GROUP BY Month(DateJoined) + ' ' + Year(DateJoined) ORDER BY Count(*) DESC -Original Message-

RE: I'm sure this worked earlier

2001-05-02 Thread Hayes, David
Looks like you have some single quote issues. -Original Message- From: Darren Adams [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 02, 2001 6:11 AM To: CF-Talk Subject: RE: I'm sure this worked earlier Here you go: I have now removed the excluded text so that it is just getting the

RE: Quotes within a quoted value

2001-05-02 Thread Hayes, David
You could do a replace with quot; -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 01, 2001 4:22 PM To: CF-Talk Subject: Quotes within a quoted value I'm trying to put a value into an input tag and am coming up with a minor problem. The value

RE: SQL troubles

2001-05-02 Thread Hayes, David
What's the problem? -Original Message- From: Mark Adams [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 02, 2001 4:54 PM To: CF-Talk Subject: SQL troubles I'm pulling out my hair can anyone see whats up here? SELECT Assets.Course_ID, Assets.Module_ID, Assets.Lesson_ID,

RE: problem with list box update

2001-04-24 Thread Hayes, David
Mark, You need to add SELECTED to the element in the drop-down which matches the value in the record you are updating. Here's some pseudo-code: CFOUTPUT query=myQueryOfSelectValuesAndContents option value=#myQueryOfSelectValuesAndContents.value# cfif

RE: CFSCRIPT Challenged ??

2001-04-23 Thread Hayes, David
for (I = 1 ; I LTE Info.RecordCount ; I = I + 1) { I = I + 1 ; Student[I]= StructNew() ; Student[I].ID = Info.Student_ID ; Student[I].LN = Info.Last_Name ; Student[I].FN = Info.First_Name ; } You are incrementing I

RE: a week before...

2001-04-19 Thread Hayes, David
Look at DateAdd. -Original Message- From: Peter Benoit [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 19, 2001 1:19 PM To: CF-Talk Subject: a week before... Hi, I make a date using: cfset now = #CreateDate(url.year, url.month, url.day)# How can I find out what the day is 7 days

RE: Netscape equivalent of iframe

2001-04-18 Thread Hayes, David
Take a look at ILayer. -Original Message- From: Rosa, Issac [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 18, 2001 12:31 PM To: CF-Talk Subject: Netscape equivalent of iframe Does anyone know of an equivalent in Netscape to the IE tag iframe. NS6 supports the tag, but we are

RE: order by not working

2001-04-17 Thread Hayes, David
If you're trying to sort by the 4th item in the columns list, omit the single quotes around 4. Given that you are using the * to select all the columns, I suggest specifying the column name in your order by clause. The next programmer (maybe you) who looks at the code will be glad you did;

RE: (Easy SQL)

2001-04-17 Thread Hayes, David
Take a look at the convert function. convert(char(8), signup_datetime, 1) as signup_date should give you what you want. -Original Message- From: Eric Dawson [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 2:09 PM To: CF-Talk Subject: (Easy SQL) I have a member table which

RE: Weird CF Error

2001-04-12 Thread Hayes, David
As the error message suggests, it's a SQL Server error. Look up "deadlock" in SQL help. -Original Message- From: Edward Chanter [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 12, 2001 8:26 AM To: CF-Talk Subject: Weird CF Error Has anyone seen these before: ~ Error

RE: SQL Returns

2001-04-12 Thread Hayes, David
Is your join correct? Should it, perhaps, be WHERE products.ItemID = prodPics.itemID? Is there a 1 to 1 relationship between products and pics? -Original Message- From: Alan Koenig [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 12, 2001 11:58 AM To: CF-Talk Subject: SQL Returns I

RE: cfoutput lists Alphabetically

2001-04-12 Thread Hayes, David
Try something like this: SELECT LEFT(lastName,1) as Initial, lastname, firstname from myTable order by Initial, lastname Then you can use the grouping attribute on the Initial field. CFOUTPUT query="myquery" group="Initial" #initial# CFOUTPUT #lastname#, #firstName# /CFOUTPUT /CFOUTPUT

RE: Insert query? - nevermind

2001-04-12 Thread Hayes, David
This is analogous to the periodic "can I use javascript to set my cf variables?" post - your CF object and your database are in different "places". The CF Query Object isn't going to be recognized by your database application. The tables don't have to be the same to use an INSERT...SELECT

RE: LOCKING

2001-04-11 Thread Hayes, David
I think you want to handle it more like this: CFSET includeItP = false CFLOCK SCOPE="SESSION" TYPE="READONLY" TIMEOUT="10" CFIF session.value EQ 0 CFSET includeItP = true /CFIF /CFLOCK CFIF includeItP CFINCLUDE TEMPLATE="somecfml.cfm" /CFIF

RE: pull numbers from a string...

2001-04-11 Thread Hayes, David
Well, you should be able to do this using REFind. For example, REFind("[0-9]*", myString , 1, true) Look at the Help for REFind for handling the returned position and length of the found item(s). You'll have to figure out how to handle multiple numbers in your string. -Original

RE: pull numbers from a string...

2001-04-11 Thread Hayes, David
grin OK, or you could do this: #REReplaceNoCase("The width of the box is 54 ","[^0-9]","","ALL")# -Original Message- From: Ethan Rosch [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 1:26 PM To: CF-Talk Subject: pull numbers from a string... Hi all.. is there a funcion that

RE: insert help

2001-04-11 Thread Hayes, David
Double check your data types; for example, are Price, Size and Date really text fields? (Its value is surrounded by single quotes in the statement.) FYI - Try to name your date fields something other than "date". -Original Message- From: Jay Patton [mailto:[EMAIL PROTECTED]] Sent:

RE: TOP function not performing

2001-04-10 Thread Hayes, David
Your ORDER BY field(s) should determine which records are returned; it your example, you should be getting the 2 records with the highest end_date value. If you order by ID, you'll get 2 records with the lowest (sorted ascending) or highest (sorted descending) ID. Is end_date in fact a date

RE: update numeric SubString?

2001-04-10 Thread Hayes, David
You're using string operations on numeric values; I assume MS-SQL is able to resolve the discrepancy, but ODBC can't. This statement works through CF: SELECT LEFT(123456,3) + '1' + right(123456 , len(123456) -4) as test. You could put the whole thing in a "CAST" statement, or you could use math

RE: Grouping Problem

2001-04-06 Thread Hayes, David
You'll need to have a computed column in your query which contains only the day value. In MS-SQL, you could use CONVERT(varchar(8),date,2) AS theDay Then you can use "theDay" as your group column. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, April

RE: Getting the value of a variable, once removed

2001-04-05 Thread Hayes, David
look at Evaluate. #evaluate("#collist#")# -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 05, 2001 3:04 PM To: CF-Talk Subject: Getting the value of a variable, once removed I have this: CFLOOP QUERY="GetFromUAT" CFLOOP

RE: Form Question

2001-04-04 Thread Hayes, David
Well, do create what you have in CF you would use Evaluate, e.g., myFormValue = evaluate("FORM.Field_name#counter#"). -Original Message- From: Jason [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 04, 2001 3:02 PM To: CF-Talk Subject: Form Question Maybe Im being dense today but

RE: Strange SQL Error...

2001-04-04 Thread Hayes, David
Do you have an update trigger on the table? -Original Message- From: Lee Fuller [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 04, 2001 2:33 PM To: CF-Talk Subject: Strange SQL Error... Has anyone seen this? There are no "subqueries" going on in this SQL statement.. But yet we get

RE: Displaying yes/no field dynamically in checkboxes?

2001-04-03 Thread Hayes, David
For a checkbox handling a yes/no column (or a bit column), you want the value attribute of the checkbox to always be "yes" (or 1 or on or true or whatever works for your db). If the current value in the db is yes, you include include the Checked attribute in your checkbox tag, e.g. input

RE: Need to find ISBN book database service with XML...

2001-04-03 Thread Hayes, David
Try the Library of Congress (http://catalog.loc.gov/help/command.htm); you can do the search on ISBN. You'll still need to parse out the data, but the results layout should be more friendly than Amazon. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday,

RE: query dates

2001-04-03 Thread Hayes, David
Don't use the quotes around your datepart in MS-SQL. I just verified that in the SQL Help; if you haven't installed it, you should. -Original Message- From: Diana Nichols [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 03, 2001 4:15 PM To: CF-Talk Subject: query dates Can someone

RE: Simple validation

2001-04-03 Thread Hayes, David
Look at the CF isDate and isNumeric functions for server side validation; For client side, here's some javascript for date format validation: var dateObj = new Date(formInput); if (isNaN(dateObj.valueOf())) return false; For numeric, use isNaN. -Original Message- From: Steven

RE: Recursing with custom tags

2001-04-02 Thread Hayes, David
You need to take a look at GetBaseTagData and GetBaseTagList. GetBaseTagData(tagname [, instancenumber ] ) Returns an object that contains data (variables, scopes, etc.) from a specified ancestor tag. By default the closest ancestor is returned. If there is no ancestor by the specified name, or

RE: Variables for shopping cart?

2001-04-02 Thread Hayes, David
Look at listFind and listDeleteAt -Original Message- From: W Luke [mailto:[EMAIL PROTECTED]] Sent: Saturday, March 31, 2001 10:36 AM To: CF-Talk Subject: Variables for shopping cart? Hi, I'm using a basic client variable, client.adshop, to set a list of Advert Numbers (eg

RE: CFMAIL drives me NUTS!

2001-03-30 Thread Hayes, David
What kind of behavior or error messages are you seeing? -Original Message- From: Mike Kear [mailto:[EMAIL PROTECTED]] Sent: Friday, March 30, 2001 9:12 AM To: CF-Talk Subject: CFMAIL drives me NUTS! I have endless trouble with CFMail in a hosted environment - because I can't get

RE: Subdirectories in CustomTags directory?

2001-03-30 Thread Hayes, David
You can put them in subdirectories, but I believe if you move an existing custom tag from it's current path, CF won't find it until you restart. Try creating a new custom tag in a subdirectory and calling it. -Original Message- From: Jamie Jackson [mailto:[EMAIL PROTECTED]] Sent:

RE: insert

2001-03-30 Thread Hayes, David
You'll have to use a separate insert statement for each table, but they can be done within the same CFQUERY block. -Original Message- From: Jones, Becky [mailto:[EMAIL PROTECTED]] Sent: Friday, March 30, 2001 11:56 AM To: CF-Talk Subject: insert is it possible to insert data into a

RE: Back-referencing after a REFind to set a variable?

2001-03-30 Thread Hayes, David
You want REReplaceNoCase. -Original Message- From: Jamie Jackson [mailto:[EMAIL PROTECTED]] Sent: Friday, March 30, 2001 1:50 PM To: CF-Talk Subject: Back-referencing after a REFind to set a variable? Hi, Is there a way to do this sort of thing? cfscript

RE: Correct Me if im wrong. PLEASE!

2001-03-29 Thread Hayes, David
It creates a count, by contestantID, of the number of records that have an eventID in them, irrespective of the eventID value (or the distinctiveness of it). I would think the COUNT (DISTINCT EventID) would work; it did on my test. Take a step back and just look at the results of SELECT

RE: Money DataType in SQL

2001-03-29 Thread Hayes, David
If you're asking about whether you need to put single quotes around the value, the answer is no. It's numeric, but is not limited to integers; they can hold up to 4 decimal places. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 29, 2001 11:00

RE: Javascirpt problem on CF

2001-03-29 Thread Hayes, David
My first suggestion is that you debug your script by putting in alert statements at various points. For example, if(byVal == true) { cnt_chk++; alert(cnt_chk);

RE: javascript add problem

2001-03-28 Thread Hayes, David
The form field values are text, so it's concatenating them. Try the javascript parseInt() function. -Original Message- From: Bernd VanSkiver [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 28, 2001 10:13 AM To: CF-Talk Subject: OT: javascript add problem Sorry about the OT question,

RE: javascript add problem

2001-03-28 Thread Hayes, David
++ is the increment operator. -Original Message- From: Craig Dudley [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 28, 2001 10:27 AM To: CF-Talk Subject: RE: javascript add problem + is for concatenating strings (spelling?) ++ will add them up i think. -Original Message-

RE: Query boggle

2001-03-28 Thread Hayes, David
It's your FROM statement; you're not joining counties, districts, schools and histories in any way, so you're getting a cartesian product set. You need some join qualifiers along the likes of vv1_Counties INNER JOIN vv1_districts on vv1_districts.countyID = vv1_Counties.countyID (or whatever

RE: query trouble

2001-03-28 Thread Hayes, David
Here are my standard steps for dealing with tough query problems: 1) View the CF-generated SQL statement by turning on debugging (or by just cfoutput -ing the code instead of cfquery -ing it. 2) Look at the generated statement for obvious errors. 3) Try to run the generated SQL directly in

RE: Statement Help!!

2001-03-28 Thread Hayes, David
What results are you getting? Take a look at the DISTINCT COUNT function, instead of the COUNT function. This should take care of the same eventID in different rodeos. -Original Message- From: Jay Patton [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 28, 2001 2:09 PM To: CF-Talk

RE: SQL Question (Access)

2001-03-28 Thread Hayes, David
You could do a subquery on the answers table: SELECT HNTQuestion.QuestionID, HNTQuestion.Category, HNTQuestion.QuestionShort, HNTCategories.HNTCategoryID, HNTCategories.HNTCategoryName FROM HNTQuestion, HNTCategories

RE: T-SQL and single quote lists

2001-03-28 Thread Hayes, David
What results are you getting? -Original Message- From: Jeff Gombala [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 28, 2001 5:43 PM To: CF-Talk Subject: T-SQL and single quote lists Is it possible to pass a single quoted list into a SQL server stored procedure for use in an "IN"

RE: Using a SQL query to drive another SQL query

2001-03-28 Thread Hayes, David
I'm not clear what you're trying to accomplish, but you can use what are called subqueries in your WHERE clause, e.g. SELECT ID,SEQUENCE,TEXT FROMMyOtherSource WHERE ID IN (SELECT ID FROMMySource WHERE NAME LIKE '#FORM.junk1#%')

RE: T-SQL and single quote lists

2001-03-28 Thread Hayes, David
e the list into the "IN" statement I get the results I am looking for it I use the parameter in the "IN" statement as such "IN (@CustList)" the query returns nothing not even any errors. It is almost like @CustList is not being evaluated inside the (). ----- Original Message ---

RE: javascript to set cfvariable?

2001-03-28 Thread Hayes, David
No you can't, Ethan. Here's the standard answer: Javascript is client side, Cold Fusion is server side. To get information from the client browser to the Cold Fusion server, you'll need to pass the information as form or url parameters. -Original Message- From: Ethan Rosch

RE: javascript to set cfvariable?

2001-03-28 Thread Hayes, David
grin Well, I figured that one could wait a while; besides I've had some problems with it on certain platforms. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 28, 2001 6:34 PM To: CF-Talk Subject: RE: javascript to set cfvariable? No you

RE: Title Case for proper names.......

2001-03-27 Thread Hayes, David
Well, another (easier?) way to handle it would be to think of your input string as a space delimited list; you can then process each word easily. CFSET skipAllCapsWordsP = true CFSET myString = "fourscore and seven years ago at IBM" CFSET mySkipList = "and,the,a,in,at" CFSET myFormattedString =

RE: last 7 days

2001-03-27 Thread Hayes, David
In MS-SQL you could use: WHERE DATEDIFF(d,cast(cast(tmonth as varchar) + '/' + cast(tday as varchar) + '/' + cast(tyear as varchar) as datetime),getDate()) = 7 -Original Message- From: Peter Benoit [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 27, 2001 12:20 PM To: CF-Talk Subject:

RE: SQL Business Dates

2001-03-27 Thread Hayes, David
Look at the DATEPART function. -Original Message- From: Alex [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 27, 2001 1:31 PM To: CF-Talk Subject: SQL Business Dates I have a query ... SELECT AVG(DATEDIFF(minute, dateasgn, datecomp)) AS diff FROM tblprob WHERE

RE: Statement Question/Help

2001-03-26 Thread Hayes, David
Use a HAVING clause before your ORDER BY clause, e.g. "having count(contestantID) = 2" -Original Message- From: Jay Patton [mailto:[EMAIL PROTECTED]] Sent: Monday, March 26, 2001 11:11 AM To: CF-Talk Subject: Statement Question/Help Good day all, I was wondering if anyone could help me

RE: SQL Joins with multiple databases

2001-03-26 Thread Hayes, David
Here's some info on doing it in MS-SQL. From Help on "FROM": table_source Specifies a table or view, both with or without an alias, to use in the Transact-SQL statement. A maximum of 256 tables can be used in the statement. A table variable may be specified as a table source. If the table or

RE: CFFILE ACTION=copy and NAMECONFLICT

2001-03-23 Thread Hayes, David
I believe you'll have to check for the existence of the file name using CFDIRECTORY first. -Original Message- From: Aidan Whitehall [mailto:[EMAIL PROTECTED]] Sent: Friday, March 23, 2001 9:08 AM To: CF-Talk Subject: RE: CFFILE ACTION="copy" and NAMECONFLICT Can't you use the

RE: Regular expression Help

2001-03-23 Thread Hayes, David
This works. CFSET theString = "meta name=""pubdate"" content=""Fri, 23 Mar 2001 07:00:00 GMT""" CFSET st = reFindNoCase("(content="")(.*)(GMT"")",theString,1,"TRUE") CFOUTPUT#mid(theString,st.pos[3],st.len[3])#/CFOUTPUT The two pieces are: 1) Creating the regularExpression 2) understanding

RE: Finding a space in a string..

2001-03-23 Thread Hayes, David
Take the quotes off of tempdefendant; it's checking the string (which doesn't have any spaces) rather than a variable. -Original Message- From: Angél Stewart [mailto:[EMAIL PROTECTED]] Sent: Friday, March 23, 2001 10:27 AM To: CF-Talk Subject: Finding a space in a string.. Hi dee ho

RE: Why wont this advance to the next record

2001-03-23 Thread Hayes, David
href="cfoutput-default2.cfm..." looks odd; is cfoutput really part of your file name? -Original Message- From: Michael [mailto:[EMAIL PROTECTED]] Sent: Friday, March 23, 2001 11:43 AM To: CF-Talk Subject: Why wont this advance to the next record Appreciate it someone could tell me why

RE: embedding variable name

2001-03-23 Thread Hayes, David
Try #evaluate(DE(theLinkString))# -Original Message- From: Toby Tremayne [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 9:38 PM To: CF-Talk Subject: embedding variable name I'm sure someone must have tried this before me - I can't figure out a way to do it. I have a

RE: Why wont this advance to the next record

2001-03-23 Thread Hayes, David
A few thoughts: 1) Cache the query so you're not calling the db every time the page loads, 2) Turn on debugging and look at the SQL statement that's actually being generated, 3) remove CFPARAM Name="ID" Default=1; I believe you're grabbing the same one record from the db every time. There is

RE: pulling CF code from a db an having that code parse in page

2001-03-23 Thread Hayes, David
Why store the "cfinclude template=" in the db? Just store the actual template name in the db. -Original Message- From: Robert Long [mailto:[EMAIL PROTECTED]] Sent: Friday, March 23, 2001 4:08 PM To: CF-Talk Subject: pulling CF code from a db an having that code parse in page Here's

RE: Newbie question - query by month

2001-03-22 Thread Hayes, David
In SQL datepart function, you don't need quotes around the "datepart" argument, and since it's a numeric value, you don't need quotes around #month#. -Original Message- From: Francis, Jennifer [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 3:12 PM To: CF-Talk Subject: Newbie

RE: Need assistance:Nested CFLOOPs

2001-03-21 Thread Hayes, David
Try setting a variable to judgement.defendant before entering the second loop, then use that variable in the innner loop. -Original Message- From: Angél Stewart [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 21, 2001 9:39 AM To: CF-Talk Subject: Need assistance:Nested CFLOOPs Hi

RE: Database Question

2001-03-21 Thread Hayes, David
There is no one-line SQL statement that will do that. You would use some looping structure if you were passing in a list of IDs, but if this is all occurring in the same batch, you can select your values into a temp table, then use an INSERTSELECT statement to insert based on your tempTable

RE: Need assistance:Nested CFLOOPs

2001-03-21 Thread Hayes, David
OK, here's something I missed the first time. You use "counter" as your index in the cfloop, but this isn't an index loop; since it's a list loop, counter evaluates to an item in the list. Look at line 6 - you're using listGetAt with counter as the position attribute; counter may be evaluating

RE: Tracking two lists of numbers

2001-03-21 Thread Hayes, David
grin Well, this first idea may not be easier than what you've done so far; you'll need to be able to use javascript to manipulate the options within a select control, and you can't do that on Netscape 4.* (I'm not sure about 6.) If you can develop this just IE only, I would suggest

RE: Read part of a string

2001-03-20 Thread Hayes, David
Look at the list functions (your values can be thought of as lists, delimited by "/") as well as the GetToken function. -Original Message- From: Michael Gribbin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 20, 2001 1:13 AM To: CF-Talk Subject: Read part of a string Hi, I need to

RE: @@identity

2001-03-20 Thread Hayes, David
There is an issue with @@identity in MS-SQL. From MS-SQL help: @@IDENTITY returns the last identity value generated in "any table" in the current session. (Quotations mine). If you have any INSERT triggers on your table that perform INSERTS on other tables, @@identity will return the identity

RE: DB structure advice

2001-03-20 Thread Hayes, David
I would break it into smaller tables. One issue is size - you don't want to store a lot of empty fields. Create each table, and use a primary key ID field to link them. Just remember that when you want a record set with all the data, you will need to use LEFT JOIN in order for the result set

RE: Code review, PLEASE

2001-03-19 Thread Hayes, David
selectCandidate is your query name; a query can't be converted to a string. You may want one of your query column names instead. -Original Message- From: Mike [mailto:[EMAIL PROTECTED]] Sent: Monday, March 19, 2001 2:01 PM To: CF-Talk Subject: Re: Code review, PLEASE This is what I

RE: Parsing a text field from a db...

2001-03-19 Thread Hayes, David
Check the evaluate function. #evaluate(myQueryName.article)# You'll need to replace the single # with double ## before evaluating it. -Original Message- From: Christian N. Abad [mailto:[EMAIL PROTECTED]] Sent: Monday, March 19, 2001 1:57 PM To: CF-Talk Subject: Parsing a text field

RE: cf query?

2001-03-19 Thread Hayes, David
1) If PromoID is numeric, omit the single quotes. 2) Your select statement returns the value, so you can just add 1 to it; you don't need to attempt to refer to it again with #Info.ClickThroughs# UPDATE NetReferrers SET ClickThroughs = (SELECT Info.ClickThroughs

RE: cf query?

2001-03-19 Thread Hayes, David
cf_sheepishGrin And as Dave Watts noted, you don't even need the subquery. /cf_sheepishGrin -Original Message- From: Hayes, David [mailto:[EMAIL PROTECTED]] Sent: Monday, March 19, 2001 2:31 PM To: CF-Talk Subject: RE: cf query? 1) If PromoID is numeric, omit the single quotes. 2

RE: Nested Query

2001-03-15 Thread Hayes, David
E_ID='#RESOURCE_ID#' If this is an integer field, it shouldn't have the single quotes around the value. Prepare to hear feedback on using "select *". -Original Message- From: Michael S. Kimmett [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 15, 2001 2:34 PM To: CF-Talk Subject:

RE: faulty join?

2001-03-13 Thread Hayes, David
Hi, Megan You will get the prereq list for each distinct schedule date for the class; I'm assuming your query is returning 3 dates for the class. Dave -Original Message- From: megan sherman [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 13, 2001 9:02 AM To: CF-Talk Subject: faulty

RE: Javascript IsDefined

2001-03-13 Thread Hayes, David
You can use the "typeof" operator. if (typeof myVarName == "undefined"){ } -Original Message- From: Jeanne Sarfaty Glazer [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 13, 2001 9:27 AM To: CF-Talk Subject: Javascript IsDefined Hi Folks, What is the Javascript equivalent to the

RE: Broken Images / Testing for file existence

2001-03-13 Thread Hayes, David
I don't know that you can. I would store that info in the database; it could be a flag which simply indicates the existence of the file or not. You could write a CF page to update the db as often as necessary (once, hourly, daily, etc.); that page would check to see if the file exists, then

RE: cfhttpparam results in a popup window

2001-03-10 Thread Hayes, David
knowledge is somewhat lacking. Thanks Date: Fri, 09 Mar 2001 09:17:30 -0600 From: "Hayes, David" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: cfhttpparam results in a popup window Message-ID: [EMAIL PROTECTED] How is the user activating the search of the

RE: dynamic query construction

2001-03-09 Thread Hayes, David
I haven't looked at your code in detail, but as a first step, I would turn on debugging, see exactly what query is being generated by your code and what form values are being returned, and then try running that query directly in your db tool. Actually one issue on my quick scan is: cfoutput

RE: cfhttpparam results in a popup window

2001-03-09 Thread Hayes, David
How is the user activating the search of the other site? If it's a link (or a form post), you can set the target to a new window. In the page that loads in the new window, you could include some javascript like opener.location.href = "successpage.cfm". -Original Message- From: Mark

RE: How to fast big query result on browser

2001-03-09 Thread Hayes, David
How many options are you putting in your select box? -Original Message- From: George Dong [mailto:[EMAIL PROTECTED]] Sent: Friday, March 09, 2001 12:30 PM To: CF-Talk Subject: How to fast big query result on browser Hi there, I have one problem, I made a select box, the option items

RE: stored procedure and resultset

2001-03-09 Thread Hayes, David
- From: Hayes, David [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 08, 2001 5:42 PM To: CF-Talk Subject: RE: stored procedure and resultset Yes. Look at CFSTOREDPROC and CFPROCRESULT; basically, you include one CFPROCRESULT tag for each result set in the stored procedure. Then you've got

RE: Sorting an Array

2001-03-09 Thread Hayes, David
Show your code. -Original Message- From: Matt Rodosky [mailto:[EMAIL PROTECTED]] Sent: Friday, March 09, 2001 1:31 PM To: CF-Talk Subject: Sorting an Array Been trying to sort a 2 dimensional array and am having trouble. The fisrt element is numeric, the 2nd is text. I'm trying to sort

RE: Re[2]: Javascript: Tearing my hair out

2001-03-08 Thread Hayes, David
I believe the first invocation of document.write clears the current document, so that those objects are no longer in existence. What you could try is concatenating all the strings you want to write in a varible (e.g., myString), then calling document.write once. function

RE: query troubles

2001-03-08 Thread Hayes, David
I believe you can only insert into 1 table per insert statement; you'll have to break it into multiple statements. -Original Message- From: C Frederic Valone [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 08, 2001 12:47 PM To: CF-Talk Subject: query troubles hello, Can anyone show me

RE: Determining no. of pages in results

2001-03-08 Thread Hayes, David
You can check query_name.CurrentRow as you are outputting the query. The page number is CurrentRow/10. -Original Message- From: W Luke [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 08, 2001 12:43 PM To: CF-Talk Subject: Determining no. of pages in results Hi, I have a query which

RE: stored procedure and resultset

2001-03-08 Thread Hayes, David
Yes. Look at CFSTOREDPROC and CFPROCRESULT; basically, you include one CFPROCRESULT tag for each result set in the stored procedure. Then you've got named CFQUERY objects you can work with. -Original Message- From: Zhou, Mei Y (Mei) [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 08,

RE: Anyone know of a custom tag to query a query ?

2001-03-08 Thread Hayes, David
I don't know of a custom tag, but if you use Query functions, you can fake it. Use QueryNew(myCFQUERY.columnlist) to create a new query object. Then iterate through your CFQUERY and check for whichever values you want. You can get clever by using valueList on your CFQUERY object to create

RE: business dates

2001-01-22 Thread Hayes, David
Here's some SQL-2000 code to get you started; it works, but will need some tweaking to meet your specific requirements. declare @mystart smalldatetime declare @myend smalldatetime declare @businessHoursPerDay tinyint declare @myHolidayCount tinyint select @mystart = '01-12-01', @myend =

RE: Outer Join Question...

2001-01-22 Thread Hayes, David
How about Select groupID, groupName from grouptable where groupID NOT IN (select groupID from groupUserTable where userID = #userID#) ? -Original Message- From: Jeffry Houser [mailto:[EMAIL PROTECTED]] Sent: Monday, January 22, 2001 1:30 PM To: CF-Talk Subject: Outer Join Question...

RE: data in columns

2001-01-19 Thread Hayes, David
1) Pull the cfset out of the cfquery block 2) You are searching on LIKE 'CBI', but testing on EQ 'CBI'; are you sure about the values? 3) Select count(cbi) as cbicount from wweb where cbi = 'CBI' -Original Message- From: Robert Orlini [mailto:[EMAIL

RE: passing cfquery results to another page

2000-12-07 Thread Hayes, David
You would have to copy the query to a scope that persists across pages. Another option: you could cache the query so that the requery on the next page will pull the cached version. This could certainly cause some problems; it will not be appropriate in many situations. -Original

RE: CF_SQL_DATE

2000-12-07 Thread Hayes, David
Are StartDate and EndDate ODBC date objects? If not, it may be that you're telling SQL server to expect ODBC dates, but you're not them. (Whereas in your CFQUERY, SQL server is figuring out how to handle that date data.) What happens if you use value="#createODBCDate(createDate( month,day and

RE: Radio buttons

2000-12-06 Thread Hayes, David
I haven't seen that before; are you able to duplicate the conditions? Browsers, data input, etc? Is the value really coming through with the "/" or is it "value1,value2"? Things to try: 1) Put commas around your INPUT attibute values, e.g. value="value1" 2) Verify that you don't have another

RE: Multiple Multiple Selects in Query

2000-12-06 Thread Hayes, David
You'll have to loop through the form values at both the category and subcategory levels. Without more info on the inserts you are trying to do, I can only guess: (psuedo-code) loop through categories insert into categories table values (loop.category) loop through subcategories

RE: What is Pragma?

2000-12-04 Thread Hayes, David
If you visit www.w3c.org, you can get more info than you ever wanted on the HTTP protocol. Here's a relevant excerpt: 14.32 Pragma The Pragma general-header field is used to include implementation- specific directives that might apply to any recipient along the request/response

RE: normalization problem?

2000-12-04 Thread Hayes, David
Here's a couple of things to try: 1) Run your queries in a db tool (SQL Query Analyzer) to compare performance of different statements AND to see how many records are being returned. This will make your life easier. 2) Make sure all the fields you are joining on are indexed. 3) Try the TOP X

RE: Problem Matching Dates

2000-12-04 Thread Hayes, David
Turn on debugging and output the query; you'll see what values are actually being passed to the db by cold fusion. You may have some luck if you make convert your form.date value to an ODBCDate object (see createODBCDate function). You could also try using the SQL CONVERT function to convert

RE: a bbs in cf

2000-12-01 Thread Hayes, David
Look at the list functions and the string functions (help for all should be in studio or one of the books; get one!) For lists, you can use any character as a delimiter, so you can do listLen("your number","."). If it's 1, you have a number of the form ; it it's 2, you have a number of

  1   2   >