Credit Card Info
I'm about to create a table to hold credit card booking info and I was wondering what info you can store regarding the card details. I don't keep the CC number, but does anyone know if it's ok to keep part of it so I can show details like CC: 1234? This is a UK based company if it makes a difference. Can anyone point me to any resources about this sort of thing. I've always been under the impression that I shouldn't keep anything. Thanks. Adrian Lynch http://www.halestorm.co.uk/ ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237800 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: sql insert statement
David, It looks like you have an extraneous ] at the end of your query. Steve Bryant 918-449-9440 Bryant Web Consulting LLC http://www.BryantWebConsulting.com/ http://steve.coldfusionjournal.com/ I'm not functioning here: Error Executing Database Query. [Macromedia][SQLServer JDBC Driver][SQLServer]Line 2: Incorrect syntax near ']'. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237803 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: sql insert statement
You have an extra ] at the end of your sql statement. '#form.charge_category#', '#form.comments_employee#')] On 4/14/06, David Elliott [EMAIL PROTECTED] wrote: I'm not functioning here: Error Executing Database Query. [Macromedia][SQLServer JDBC Driver][SQLServer]Line 2: Incorrect syntax near ']'. The error occurred in C:\Inetpub\wwwroot\DaveActionForm.cfm: line 18 16 : cfquery name=creditcard datasource=creditcard 17 : insert into card_information([date of entry], [date of charge], [vendor name], [amount of charge], [credit card number], [charge category], [employee / comments]) 18 :values('#form.dateofentry#', '#form.date_of_charge#', '#form.vendor_name#', #form.amount_of_charge#, '#form.credit_card_number#', '#form.charge_category#', '#form.comments_employee#')] 19 : /cfquery 20 : SQLinsert into card_information([date of entry], [date of charge], [vendor name], [amount of charge], [credit card number], [charge category], [employee / comments]) values('4/14/06', '12/31/06', 'whodunit', 0.00, '6167', 'food', '')] DATASOURCE creditcard any comments or guidance appreciated! Dave ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237802 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: 404 errors and old google data
cfheader statuscode=301 statustext=Moved Permanently cfheader name=Location value=#newURL# cfabort Is there any way to create a one page handler that would do this for a list of pages (assuming I know the names of the templates found to be missing)? ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237804 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: database linking table naming conventions?
link_user_group. Name your tables in all lower case (or all upper case - never mixed case), and use singular nouns, rather than plurals. I typically order the tables in a link table's name with the same order as the direction of common usage. So you mostly want to get the groups of a user, not the users in a group, so it's named link_user_group. But that's all personal preference, and has almost no meaning on anything, as long as you're consistent. Note also that this only applies to two-column tables, where each is a foreign key, and they're combined to form the primary key. If that definition doesn't work, then you're not talking about a link table, you're talking about an association entity (where the association is an entity in it's own right), and should be named as such. cheers, barneyb On 4/14/06, John McKown [EMAIL PROTECTED] wrote: Imagine these two database tables: Users and Groups You want a Foreign Key table to link them together (or what I call a linking table) that might be named UserGroups. But UserGroups as a table name itself does not stand out in the table list because it does not use a prefixed naming convention (something I like about Fusebox on the web side). Examples table names might be: LT_Users_Groups or FK_Users_Groups. Is there an understood standard there? Also, the order of the table names might need to be taken into account based on where the foreign keys are. Thoughts? John McKown -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 100 invites. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237806 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
FW: Using first CFC wih 6.1
Could someone please help a newbie in 6.1 to implement my first cfc? I am trying to use the zipcfc from the exchange and would Appreciate it if someone could share and example of how to Implement it with example paths, parameters, etc. I have put the cfc in my custom tags folder. Or if there is a better way please reply. Terry Troxel I want to zip up a complete site for backup purposes. The site is at d:\inetpub\wwwroot\demo_site ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237813 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Pause?
If I wanted to say have a template pause for 10 seconds, how would you do that, I mean, I can think of a couple of looping ways that would accomplish about the same thing, but I remember seeing a Java class that does this properly. http://www.google.com/search?q=thread.sleep+cfmx Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237801 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: StructFindKey Path and evaluate
Most likely I missed something, because doesn't structFindKey return a value as well as the path to the key? Unless you're talking about getting the path to another key, not the one you just found.? XPath only works with XML documents, neh? Hmm... must need more coffee... missing something obvious, feels I... :d On 4/14/06, Bruce, Rodney S C-E LCMC HQISEC/Signal Solutions [EMAIL PROTECTED] wrote: Isaac, Thanks for the script, will have to play around with it. I also found Structget(), but it doesn't like anything other than alpha and numeric in the Keys. Even using ['item 1'], Structget() throws an error or ['item-1'], has to be ['item1']. Using rereplace(key, '[^[:alpha:]]', ,all) when I create the structure, I can get Structget() to work. It is a pain, because then everytime the structure is searched,the rereplace needs to be done on the key. But this is still faster than looping thru the structure to find a key(at least on large Structures). FoundPath = StructKeyFind(MyStruct, rereplace(key, '[^[:alpha:]]', ,all) ) NewPath = 'MyStruct' FoundPath[x].path FoundKey = StructGet(Newpath) #FoundKey.lastitem# can even: FoundKey[newitem] = StructNew() FoundKey[newitem].hours = hoursWorked In my case here newitem would be a persons id. Rodney ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237808 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: sql insert statement
you have a trailing ] behind the VALUES clause. That would be my guess. On 4/14/06, David Elliott [EMAIL PROTECTED] wrote: I'm not functioning here: Error Executing Database Query. [Macromedia][SQLServer JDBC Driver][SQLServer]Line 2: Incorrect syntax near ']'. The error occurred in C:\Inetpub\wwwroot\DaveActionForm.cfm: line 18 16 : cfquery name=creditcard datasource=creditcard 17 : insert into card_information([date of entry], [date of charge], [vendor name], [amount of charge], [credit card number], [charge category], [employee / comments]) 18 :values('#form.dateofentry#', '#form.date_of_charge#', '#form.vendor_name#', #form.amount_of_charge#, '#form.credit_card_number#', '#form.charge_category#', '#form.comments_employee#')] 19 : /cfquery 20 : SQLinsert into card_information([date of entry], [date of charge], [vendor name], [amount of charge], [credit card number], [charge category], [employee / comments]) values('4/14/06', '12/31/06', 'whodunit', 0.00, '6167', 'food', '')] DATASOURCE creditcard any comments or guidance appreciated! Dave ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237810 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Insert SQL Statement
It depends on the database, but I've had good luck with [table name] and 'schema'.'table name'. MySQL uses ` (back-tick) even. You'll need that if you run into tables with names like group or date (reserved words) as well. :D On 4/14/06, David Elliott [EMAIL PROTECTED] wrote: Poor planning on my part but, I have a table on an sql server named 'card information'. It is two words. There are 5 rows inside this table. They two are made up of names like 'credit card number' or 'amount of charge' (all without the punctuation[. It looks like the rows are working just fine. However, I am unsure how to deal with the two word table name. Any suggestions? Thanks, Dave ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237807 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
CF/mysql Datetime Best Practices
Hey all, I've tended to store dates as a simple epoch integer (seconds from Jan, 1970), a throwback to perl/tcl/php development days. While this method is a little antiquated, it makes the dates database and software independent. CF, perl, php, database upgrade, whatever... can and will handle these integers fine (well, until 2038). However, I suspect that some of the mysql date/time datatypes and functions offer some serious functionality and time saving improvements. So I'm just wondering what's considered the current best practice use of date and time storage in mysql using CF. Timestamp? Datetime? Neither? Is using epoch times a no-no nowadays, or do other people still use it? Regards, Terry ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237815 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Pause?
If I wanted to say have a template pause for 10 seconds, how would you do that, I mean, I can think of a couple of looping ways that would accomplish about the same thing, but I remember seeing a Java class that does this properly. Ideas? In CFMX, you can use: oThread = createObject(java, java.lang.Thread); oThread.sleep(1); // number of milliseconds to sleep -Dan ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237816 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: OT: Mysql outer join with conditions syntax
I'm wondering if the p.active = 1 and u.active=1 ought to be in the ON clause, then there would be no need for the additional check for NULL. On 4/14/06, Deanna Schneider [EMAIL PROTECTED] wrote: Hey folks, I'm trying to convert a project from Oracle to Mysql 5, and I have a question about outer join syntax in mysql. In oracle, I can do something like the below to tell Oracle that on the outer joined table, if there's a value, I want it to be X. On mySql, all I've been able to figure out is the second syntax (which works, I think). Is that the preferred method? ORACLE, NON-STANDARDS COMPLIANT CODE FROMfscd_client c, fscd_county x, fscd_state s, fscd_survey u, fscd_post p WHEREc.countyid = x.countyid ANDx.stateid = s.stateid ANDc.clientid = u.clientid (+) ANDc.clientid = p.clientid (+) AND c.active = 1 ANDp.active (+) = 1 ANDu.active (+) = 1 !--- This part here says that if a value exists, it should be 1 --- MYSQL VERSION FROM (fscd_county x JOIN fscd_client c ON (x.countyid = c.countyid) JOIN fscd_state s on (s.stateid = x.stateid)) LEFT OUTER JOIN fscd_survey u ON c.clientid = u.clientid LEFT OUTER JOIN fscd_post p ON c.clientid = p.clientid WHERE x.active = 1 ANDc.active = 1 AND(p.active = 1 OR p.active is null) AND(u.active = 1 OR u.active is null) !--- Is this the preferred method in Mysql? --- ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237814 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Pause?
Loathe said: If I wanted to say have a template pause for 10 seconds, how would you do that, I mean, I can think of a couple of looping ways that would accomplish about the same thing, but I remember seeing a Java class that does this properly. cfset lockname = CreateUUID() cflock name=#lockname# type=readonly timeout=1 cflock name=#lockname# type=exclusive timeout=10 throwontimeout=no /cflock /cflock Jochem ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237805 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Using first CFC wih 6.1
Could someone please help a newbie in 6.1 to implement my first cfc? I am trying to use the zipcfc from the exchange and would Appreciate it if someone could share and example of how to Implement it with example paths, parameters, etc. I have put the cfc in my custom tags folder. Terry Troxel I want to zip up a complete site for backup purposes. The site is at d:\inetpub\wwwroot\demo_site ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237812 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Pause?
Here is one way... cfset thread = CreateObject(java, java.lang.Thread) cfset thread.sleep(25000) 25000=???Milliseconds... Aaron -Original Message- From: Loathe [mailto:[EMAIL PROTECTED] Sent: Friday, April 14, 2006 2:26 PM To: CF-Talk Subject: Pause? If I wanted to say have a template pause for 10 seconds, how would you do that, I mean, I can think of a couple of looping ways that would accomplish about the same thing, but I remember seeing a Java class that does this properly. Ideas? -- Timothy Heald Analyst, Architect, Developer [EMAIL PROTECTED] W: 202-228-8372 C: 703-300-3911 ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237811 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Query o Queries and apost's
While I'm thinking about it, has anyone seen a weird thing with QoQs, where if you are using generated SQL ( like so: cfquery name=qoq dbtype=query #someSQL# /cfquery ) You get strange extra apostrophes? I say strange because doing cfset someSQL = replace(someSQL,',,ALL) doesn't work, (there aren't any extra apostrophes in the first place) but cfquery name=qoq dbtype=query #replace(someSQL,',,ALL)# /cfquery does? I.E. the extra 's only get added within the cfquery tag? (Pretend I have correct ordering of vars in replace ;-)) I think it just must be a brain-fart somewhere along the line... I haven't seen anything like it via google, so I figure, it's on this end. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237817 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: database linking table naming conventions?
A while back, someone on this list posted how they use an X to mark linking tables. tblTablename_X I like that. Will ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237819 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Pause?
I got squared away off list earlier, thanks though :) -- Timothy Heald Analyst, Architect, Developer [EMAIL PROTECTED] W: 202-228-8372 C: 703-300-3911 -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: Friday, April 14, 2006 4:03 PM To: CF-Talk Subject: RE: Pause? http://www.cflib.org/udf.cfm/sleep -Original Message- From: Loathe [mailto:[EMAIL PROTECTED] Sent: 14 April 2006 19:26 To: CF-Talk Subject: Pause? If I wanted to say have a template pause for 10 seconds, how would you do that, I mean, I can think of a couple of looping ways that would accomplish about the same thing, but I remember seeing a Java class that does this properly. Ideas? -- Timothy Heald Analyst, Architect, Developer [EMAIL PROTECTED] W: 202-228-8372 C: 703-300-3911 ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237809 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: 19 = 19 - query error
On 4/14/06, Adrian Lynch [EMAIL PROTECTED] wrote: And to balance out the argument some, writing all the columns takes longer to write! Go on, fire away, I'm in my bunker and the flaps are down :OD Adrian Incoming! (Heh. Not often is it the other guys yelling that) Why wouldn't you write out columns? Isn't all your SQL generated? O.o Surely you're not actually hard-coding names... right? You do have just one place where if you change a field name, it updates the forms, the SQL... basically everything where that name was referenced? Then you can force your DB person use your CF code to manipulate the DB. They love that. Really. :Deni -Original Message- From: Ben Nadel [mailto:[EMAIL PROTECTED] Sent: 14 April 2006 20:32 To: CF-Talk Subject: RE: 19 = 19 - query error Rick, This is the easiest problem in the world to fix Don't use SELECT *. Name the column in the select statement. Not only does this cut out your problem, it also: 1. Makes the select statement more clear to anyone else reading. 2. Increases speed of the query. 3. Decreases the amount (most likely) of info that SQL has to transfer to the CF memory space. Cheers, ben ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237820 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: CFUPDATE Question/Problem - found it
Les -- Thanks for posting -- I was in the middle of migrating a CF5 app to CF7 and ran into exactly the same issue. The code works fine on CF5, but not on CF7. I added ID into the formfields argument and it fixed it. They should REALLY fix the error message that gets thrown because it was referencing fields I wasn't even using in the formfields declaration. On 2/18/06, Les Mizzell [EMAIL PROTECTED] wrote: I just needed more coffee! I left the ID field out of the list. Seems like an odd error for that though Slight/Weird(?) cfupdate problem For the below: cfif IsDefined(form.step2) AND #form.step2# EQ step2 cfupdate tablename=voucher datasource=#request.dbsource# password=#request.dbpass# username=#request.dbuser# formfields=fv2_ndp_oc_hours, fv2_ndp_oc_amount, fv2_ndp_oc_total /cfif If I pass any fieldnames that are NOT in the table, even though I've got the fields I want updated listed, I get an error saying that the field in the specific table can not be found. step2 is not a field in the table, but I ge The given fieldname STEP2 could not be found in the table voucher. Listing the fields in the CFUPDATE doesn't exclude anything else being passed? Or have I not had enough coffee and something is about to bite my a** and I just don't see it? ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237821 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: disk size manager
The problem is we don't have access to our production servers, but CF has full access to the drives. I didn't see this post you mentioned, my email is whacky today so I apologize to anyone if it seems that I ignored their help -seth -Original Message- From: Munson, Jacob [mailto:[EMAIL PROTECTED] Sent: Friday, April 14, 2006 3:21 PM To: CF-Talk Subject: RE: disk size manager As someone else mentioned, I think what you need to do is best handled by the OS. You can probably do something with CF, but it's probably going to be time consuming and inefficient. If you're on Linux, you can use the du command in a script, and call this with cfexecute. I'm not sure if there's anything that handy in Windows land... -Original Message- From: Turetsky, Seth [mailto:[EMAIL PROTECTED] Sent: Friday, April 14, 2006 11:35 AM Andy/Jacob Very handy, but I'm using BlueDragon. Tried it out of curiosity, but it just listed the current directory. Will inquire with NewAtlanta about it. -Original Message- From: Munson, Jacob [mailto:[EMAIL PROTECTED] Sent: Friday, April 14, 2006 1:06 PM ColdFusion 7 has recursion built into cfdirectory I believe. You are correct: http://coldfusioncookbook.com/entry/79/How-do-I-find-the-size- of-a-direc tory? [INFO] -- Access Manager: This transmission may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. A2 ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237818 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
cache control in Netscape
Question for you gurus. We use CFHEADER to control cache on select pages in sites, mainly forms that we do not want people clicking the back button to resubmit. On IE and Firefox, the following tag works like a charm for us. But in Netscape it seems to not clear the cache. cfheader name=Cache-Control value=no-cache, no-store Any ideas on what to use to get Netscape in line with the others? thanks -r _ Rob Barthle Contractor - Sr. Software Developer [EMAIL PROTECTED] 202-245-6484 ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237822 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: database linking table naming conventions?
I like the below method becase most DB programs sort tables in alpha order, so all your related tables group together. When I do have to group two groups (it happens), I usually start the name with the primary table first (see caveat about english/spanish: big river / river big ;). A lot of this really depends on the amout of tables, RDBMS, etc i.e. sometimes a table might be user other times, users. I think the important thing is to be consistent (This is where keeping your queries apart from the rest of the code comes in handy. If you need to re-reference your tables, you only have one place to go). Or, to link back to the GIGO, so long as you've picked a format/place for writing your queries that you could say, easily change with a regex without having to worry about nicking something unintentionally... But best is probably: name your stuff consistently, and keep your DB logic in it's own realm. So long as you've stuck to a format, you can always code up a schema rename-a when you need to switch to a more supportive framework (It's never as smooth as you'd like, but it's a hell of a lot easier). Or sometimes, like was said, it's the preference of the DB admin, so if you're coding a project to be portable, you better have a pretty easy method of changing the schema and whatnot. If you use test cases, you could find out pretty quick if your new schema fits the bill. Isaac's SQL abstraction layer would probably help in instances like this as well. No need to convert all those TOPs to LIMiTs ;-) (I'm guessing, as I haven't checked it out yet, but it does sound like a good idea). Eh. Food for thought. On 4/14/06, Shepherd, Brandon [EMAIL PROTECTED] wrote: I preface all table names with 3 character group reference. SECURITY SEC_Roles PK=Role_Key SEC_Users PK=User_Key SEC_User_Roles PK=User_Role_Key FK=Role_Key FK=User_Key BILLING BIL_Invoices PK=Invoice_Key BIL_Payments PK=Payment_Key BIL_Invoice_Payments FK=Invoice_Key FK=Payment_Key Etc... -B ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237823 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Pause?
Hi Timothy Your are correct Java does have a facility to do this, I have attached a link below to a article explaining how to achieve a pause/sleep in your cf templates: http://www.coldfusioncookbook.com/entry/61/How-do-I-make-a-template-pause(sleep ) Hope this helps Jose Diaz On 4/14/06, Adrian Lynch [EMAIL PROTECTED] wrote: http://www.cflib.org/udf.cfm/sleep -Original Message- Wrom: YUCDDJBLVLMHAALPTCXLYRWTQTIPWIGYOKSTTZRCLBDXRQBGJSNBOHMKHJYFMYXOEAIJJPHSCRTNHGSWZIDREXCAXZOWCONEUQZAAFXISHJEXXIMQZUIVOTQNQEMSFDULHPQQWOYIYZUNNYCGPKYLEJGDGVCJVTLBXFGGMEPYOQKEDOTWFAOBUZXUWLSZLKBRNVWWCUFPEGAUTFJMVRESKPNKMBIPBARHDMNNSKVFVWRKJVZCMHVIBGDADRZFSQHYUCDDJBLVLMHAALPTCXLYRWTQTIPWIGYOKSTTZRCLBDXRQBGJSNBOHMKHJYFMYXOEAIJJPHSCRTNHGSWZIDREXCAXZOWCONEUQZAAFXISHJEXXIMQZUIVOTQNQEMSFDULHPQQWOYIYZUNNYCGPKYLEJGDGVCJVTLBXFGGMEPYOQKEDOTWFAOBUZXUWLSZLKBRNVWWCUFPEGAUTFJMVRESKPNKMBIPBARHDMNNSKVFVWRKJVZCMHVIBGDADRZFSQHYUCDDJBLVLMHAALPTCXLYRWTQTIPWIGYOKSTTZRCLBDXRQBGJSNBOHMKHJYFMYXOEAIJJPHSCRTNHGSWZIDREXCAXZOWCONEUQZAAFXISHJEXXIMQZUIVOTQNQEMSFDULHPQQWOYIYZUNNYCGPKYLEJGDGVCJVTLBXFGGMEPYOQKEDOTWFAOBUZXUWLSZLKBRNVWWCUFPEGAUTFJMVRESKPNKMBIPBARHDMNNSKVFVWRKJVZCMHVIBGDADRZFSQHYUCDDJBLVLMHAALPTCXLYRWTQTIPWIGYOKSTTZRCLBDXRQBGJSNBOHMKHJYFMYXOEAIJJPHSCRTNHGSWZIDREXCAXZOWCONEUQZAAFXISHJEXXIMQZUIVOTQNQEMSFDULHPQQWOYIYZUNNYCGPKYLEJGDGVCJVTLBXFGGMEPYOQKEDOTWFAOBUZXUWLSZLKBRNVWWCUF ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237824 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Pause?
createObject(java, java.lang.Thread).sleep(10 * 1000); The param is in milliseconds, hence the multiplication. cheers, barneyb On 4/14/06, Loathe [EMAIL PROTECTED] wrote: If I wanted to say have a template pause for 10 seconds, how would you do that, I mean, I can think of a couple of looping ways that would accomplish about the same thing, but I remember seeing a Java class that does this properly. Ideas? -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 100 invites. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237825 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Credit Card Info
The question of whether you should or shouldn't keep anything is a practicality issue. There are quite a few obligations put on you if you store any of the card details in any form - written, electronic or engraved into marble. For example, if you store the card number, and it ends up being stolen, you could be held liable for the losses the cardholder incurs as a result. The terms are outlined in the merchant agreement you signed when you agreed to take on the card merchant facility. In short, if you store anything you have to go to a lot of lengths to protect the data from malicious or accidental interception - separate database server, encryption, secure transmission between servers etc etc.This applies not only to data stored on your web site servers, but also in your accounting system and in local servers. You have to protect the data from being misused by disgruntled or dishonest employees for example or you could possibly be held liable for any losses incurred by the cardholder. The easiest way to honour your obligations for all this is just to not store the info.There's nothing that says you can't store it. Just that if you do store it, you must do everything practical to ensure it's safe from dishonest, negligent or malicous people who might come in contact with it. Your own bank's merchant services people should tell you whether it's ok to store just the last four digits of the number (your rules might be different from ours), but if it's any help, it's acceptable in Australia to store and print the last four digits in the form you outline. Cheers Mike Kear Windsor, NSW, Australia Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month On 4/16/06, Adrian Lynch [EMAIL PROTECTED] wrote: I'm about to create a table to hold credit card booking info and I was wondering what info you can store regarding the card details. I don't keep the CC number, but does anyone know if it's ok to keep part of it so I can show details like CC: 1234? This is a UK based company if it makes a difference. Can anyone point me to any resources about this sort of thing. I've always been under the impression that I shouldn't keep anything. Thanks. Adrian Lynch http://www.halestorm.co.uk/ ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237826 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: sql insert statement
you have an extra closing bracket ( ] ) at the very end of the statement , '#form.comments_employee#')] /cfquery On 4/14/06, David Elliott [EMAIL PROTECTED] wrote: I'm not functioning here: Error Executing Database Query. [Macromedia][SQLServer JDBC Driver][SQLServer]Line 2: Incorrect syntax near ']'. The error occurred in C:\Inetpub\wwwroot\DaveActionForm.cfm: line 18 16 : cfquery name=creditcard datasource=creditcard 17 : insert into card_information([date of entry], [date of charge], [vendor name], [amount of charge], [credit card number], [charge category], [employee / comments]) 18 :values('#form.dateofentry#', '#form.date_of_charge#', '#form.vendor_name#', #form.amount_of_charge#, '#form.credit_card_number#', '#form.charge_category#', '#form.comments_employee#')] 19 : /cfquery 20 : SQLinsert into card_information([date of entry], [date of charge], [vendor name], [amount of charge], [credit card number], [charge category], [employee / comments]) values('4/14/06', '12/31/06', 'whodunit', 0.00, '6167', 'food', '')] DATASOURCE creditcard any comments or guidance appreciated! Dave ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237827 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: CF/mysql Datetime Best Practices
Terry Ford wrote: little antiquated, it makes the dates database and software independent. CF, perl, php, database upgrade, whatever... can and will handle these integers fine (well, until 2038). uh, cf uses's something like Excel_Time or DB2_Time, it's numeric time unit is *days* since 31-dec-1899 (it's epoch). http://www.sustainablegis.com/blog/cfg11n/index.cfm?mode=entryentry=1B4F713B-20ED-7DEE-2A22B1EECF163043 http://www.sustainablegis.com/blog/cfg11n/index.cfm?mode=entryentry=2F5D1C39-20ED-7DEE-2A574887674E00F2 using epoch times a no-no nowadays, or do other people still use it? see the 2nd blog entry. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237828 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: CF/mysql Datetime Best Practices
Terry Ford wrote: little antiquated, it makes the dates database and software independent. CF, perl, php, database upgrade, whatever... can and will handle these integers fine (well, until 2038). uh, cf uses's something like Excel_Time or DB2_Time, it's numeric time unit is *days* since 31-dec-1899 (it's epoch). http://www.sustainablegis.com/blog/cfg11n/index.cfm?mode=entryentry=1B4F713B-20ED-7DEE-2A22B1EECF163043 http://www.sustainablegis.com/blog/cfg11n/index.cfm?mode=entryentry=2F5D1C39-20ED-7DEE-2A574887674E00F2 using epoch times a no-no nowadays, or do other people still use it? see the 2nd blog entry. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237829 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: insert a list into database
Sorry, Isaac. You saw what I missed...that John's tbl_list was the name of a single column, not a variable representing a list of columns. And in light of that error on my part, I apologize for my flip response. On 4/14/06, Dina Hess [EMAIL PROTECTED] wrote: Hmmm...too bad you wrote all that before you tried it. :) On 4/14/06, S. Isaac Dealey [EMAIL PROTECTED] wrote: I don't think that will work with an insert statement. The standard for SQL insists on one value per column for inserts and updates. It's only IN and NOT IN constructs in where clauses where comma separated lists are allowed. In an insert statement with only one column in the table, a comma in the values list should produce a too many values or number of values does not match number of columns error message. John, You also don't need the loop. Just add list=yes inside your cfqueryparam. Dina On 4/14/06, john holmes [EMAIL PROTECTED] wrote: That surely was it, thank you. Jerry Johnson [EMAIL PROTECTED] wrote: In an insert statement, you don't need the tml_list = in the values set. INSERT into tbl (field_list) VALUES (valuelist) so in your example INSERT INTOList_prac (tbl_list) VALUES () On 4/14/06, john holmes wrote: Hi, I have an list that I need to insert into a mysql database and I am not quite sure how to do it. Right now I take the list variable #thiswillbemylist# and if I run a cfloop list to insert it but it just gets a null value in database. The part of query to insert is this: INSERT INTOList_prac (tbl_list) VALUES (tbl_list = ) Can someone help? Thanks John - Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1�/min. ~~ ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237830 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Pause?
Google java's sleep method. Also search for that on cflib.org. I'm pretty sure there is a udf for it on there. _ From: Loathe [mailto:[EMAIL PROTECTED] Sent: Fri 4/14/2006 1:25 PM To: CF-Talk Subject: Pause? If I wanted to say have a template pause for 10 seconds, how would you do that, I mean, I can think of a couple of looping ways that would accomplish about the same thing, but I remember seeing a Java class that does this properly. Ideas? -- Timothy Heald Analyst, Architect, Developer [EMAIL PROTECTED] W: 202-228-8372 C: 703-300-3911 ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237831 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: 19 = 19 - query error
Nope, I use a passive code generator. Less risky :O) Incoming! (Heh. Not often is it the other guys yelling that) No comment on the friendly fire! :O. -Original Message- From: Denny Valliant [mailto:[EMAIL PROTECTED] Sent: 16 April 2006 04:41 To: CF-Talk Subject: Re: 19 = 19 - query error On 4/14/06, Adrian Lynch [EMAIL PROTECTED] wrote: And to balance out the argument some, writing all the columns takes longer to write! Go on, fire away, I'm in my bunker and the flaps are down :OD Adrian Incoming! (Heh. Not often is it the other guys yelling that) Why wouldn't you write out columns? Isn't all your SQL generated? O.o Surely you're not actually hard-coding names... right? You do have just one place where if you change a field name, it updates the forms, the SQL... basically everything where that name was referenced? Then you can force your DB person use your CF code to manipulate the DB. They love that. Really. :Deni -Original Message- From: Ben Nadel [mailto:[EMAIL PROTECTED] Sent: 14 April 2006 20:32 To: CF-Talk Subject: RE: 19 = 19 - query error Rick, This is the easiest problem in the world to fix Don't use SELECT *. Name the column in the select statement. Not only does this cut out your problem, it also: 1. Makes the select statement more clear to anyone else reading. 2. Increases speed of the query. 3. Decreases the amount (most likely) of info that SQL has to transfer to the CF memory space. Cheers, ben ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237833 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
isValid() question
hola peeps. and pardon me if this is oft asked. has anyone noticed any oddities with the regex behind isValid(), such that i should stay away from any of them, and roll my own (well, with the help of people like ben doom - our resident ninja) or are they all fairly bulletproof, and ready to roll? yes, somehow, just tonight i learnt of this powerful little guy. thanks! tony ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237834 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Query o Queries and apost's
To be honest(does anyone ever say to be a liar?!), I'm too busy writing out columns names to read your email correctly, but have a play about with PreserveSingleQuotes() Adrian -Original Message- From: Denny Valliant [mailto:[EMAIL PROTECTED] Sent: 16 April 2006 04:55 To: CF-Talk Subject: Query o Queries and apost's While I'm thinking about it, has anyone seen a weird thing with QoQs, where if you are using generated SQL ( like so: cfquery name=qoq dbtype=query #someSQL# /cfquery ) You get strange extra apostrophes? I say strange because doing cfset someSQL = replace(someSQL,',,ALL) doesn't work, (there aren't any extra apostrophes in the first place) but cfquery name=qoq dbtype=query #replace(someSQL,',,ALL)# /cfquery does? I.E. the extra 's only get added within the cfquery tag? (Pretend I have correct ordering of vars in replace ;-)) I think it just must be a brain-fart somewhere along the line... I haven't seen anything like it via google, so I figure, it's on this end. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237832 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Pause?
http://www.cflib.org/udf.cfm/sleep -nathan strutz http://www.dopefly.com/ On 4/14/06, Loathe [EMAIL PROTECTED] wrote: If I wanted to say have a template pause for 10 seconds, how would you do that, I mean, I can think of a couple of looping ways that would accomplish about the same thing, but I remember seeing a Java class that does this properly. Ideas? -- Timothy Heald Analyst, Architect, Developer [EMAIL PROTECTED] W: 202-228-8372 C: 703-300-3911 ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237835 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Pause?
sleep http://www.petefreitag.com/item/85.cfm On 4/14/06, Loathe [EMAIL PROTECTED] wrote: If I wanted to say have a template pause for 10 seconds, how would you do that, I mean, I can think of a couple of looping ways that would accomplish about the same thing, but I remember seeing a Java class that does this properly. Ideas? -- Timothy Heald Analyst, Architect, Developer [EMAIL PROTECTED] W: 202-228-8372 C: 703-300-3911 ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237836 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: CF/mysql Datetime Best Practices
Terry Ford wrote: So I'm just wondering what's considered the current best practice use of date and time storage in mysql using CF. Timestamp? Datetime? Neither? Is using epoch times a no-no nowadays, or do other people still use it? For what it's worth, I use the datetime field in MySQL, PostgreSQL, and SQL Server, and my programmatical code is exactly the same for each. Just because it's more complicated to handle actual datetime objects in other languages doesn't mean I'm going to avoid using them. I DO tend to avoid the less compatible datatypes I never use tinyint, bit or boolean datatypes when developing apps that I need to run in multiple databases, because not all databases have them or treat them the same - the bit in postgresql is very handled differently from the bit in SQL Server, and the YesNo in access, and there's no equivalent in MySQL. tinyints aren't universal either so I go to smallint... the increase in storage requirements are minimal and even if you're only storing 0s and 1s I doubt there's a performance difference. Anyway, other advantages of using datetime fields instead of epoch time is the ability to use datetime functions in your database queries. I recently did a job where I used the following: group by Year(myDate), Month(myDate) to retrieve monthly data totals. Rick ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237837 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: sql insert statement
Hi Dave You appear to have a closing bracket at the end of your values insert: '#form.comments_employee#')] -- note the closing bracket. Try this: cfquery name=creditcard datasource=creditcard insert into card_information ( [date of entry], [date of charge], [vendor name], [amount of charge], [credit card number], [charge category], [employee / comments] ) values ( '#form.dateofentry#', '#form.date_of_charge#', '#form.vendor_name#', #form.amount_of_charge#, '#form.credit_card_number#', '#form.charge_category#', '#form.comments_employee#') /cfquery To make your life alot easier I would try not to use column names with spaces in the future. Thanks Jose Diaz On 4/14/06, David Elliott [EMAIL PROTECTED] wrote: I'm not functioning here: Error Executing Database Query. [Macromedia][SQLServer JDBC Driver][SQLServer]Line 2: Incorrect syntax near ']'. The error occurred in C:\Inetpub\wwwroot\DaveActionForm.cfm: line 18 16 : cfquery name=creditcard datasource=creditcard 17 : insert into card_information([date of entry], [date of charge], [vendor name], [amount of charge], [credit card number], [charge category], [employee / comments]) 18 :values('#form.dateofentry#', '#form.date_of_charge#', '#form.vendor_name#', #form.amount_of_charge#, '#form.credit_card_number#', '#form.charge_category#', '#form.comments_employee#')] 19 : /cfquery 20 : SQLinsert into card_information([date of entry], [date of charge], [vendor name], [amount of charge], [credit card number], [charge category], [employee / comments]) values('4/14/06', '12/31/06', 'whodunit', 0.00, '6167', 'food', '')] DATASOURCE creditcard any comments or guidance appreciated! Dave ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237838 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: insert a list into database
Hmmm...too bad you wrote all that before you tried it. :) On 4/14/06, S. Isaac Dealey [EMAIL PROTECTED] wrote: I don't think that will work with an insert statement. The standard for SQL insists on one value per column for inserts and updates. It's only IN and NOT IN constructs in where clauses where comma separated lists are allowed. In an insert statement with only one column in the table, a comma in the values list should produce a too many values or number of values does not match number of columns error message. John, You also don't need the loop. Just add list=yes inside your cfqueryparam. Dina On 4/14/06, john holmes [EMAIL PROTECTED] wrote: That surely was it, thank you. Jerry Johnson [EMAIL PROTECTED] wrote: In an insert statement, you don't need the tml_list = in the values set. INSERT into tbl (field_list) VALUES (valuelist) so in your example INSERT INTOList_prac (tbl_list) VALUES () On 4/14/06, john holmes wrote: Hi, I have an list that I need to insert into a mysql database and I am not quite sure how to do it. Right now I take the list variable #thiswillbemylist# and if I run a cfloop list to insert it but it just gets a null value in database. The part of query to insert is this: INSERT INTOList_prac (tbl_list) VALUES (tbl_list = ) Can someone help? Thanks John - Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1�/min. ~~ ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237839 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
cfreport builder - page breaks
Hi guys, I'm having some troubles with the report builder. Is it possible to add a manual page break? I'm creating a report that has a cover page and a summary page, then a number of other reports (up to 9) as subreports. The cover page I can create by setting a page break after the report header. But the summary page has me stumped. I'm also not sure, will I be able to specify that each subreport starts on a new page? Is there a better way to do this? I was thinking of creating the individual reports and pages and then stitching the results together with a PDF tool, but I would like the page numbers to be sequential (and correct!) which would make this difficult, I imagine. Thanks in advance for any tips! -- Kay Smoljak http://kay.zombiecoder.com/ ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237840 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
searching for online booking system written in CF
Hi, everyone. I'm trying to find an out-of-the-box online booking/online reservations system written in CF designed to work with MySQL. Anyone know of such an animal? Thanks. Desiree ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237841 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Pause?
Loathe wrote: If I wanted to say have a template pause for 10 seconds, how would you do that, I mean, I can think of a couple of looping ways that would accomplish about the same thing, but I remember seeing a Java class that does this properly. Ideas? -- Timothy Heald Analyst, Architect, Developer [EMAIL PROTECTED] W: 202-228-8372 C: 703-300-3911 Thanks to Charlie Arehart for this code: cfobject type=JAVA name=obj class=java.lang.Thread action=CREATE cfset obj.sleep(1) to pause processing for 10 seconds. Hope this helps! -- Warm regards, Jordan Michaels Vivio Technologies http://www.viviotech.net/ Blue Dragon Alliance Member [EMAIL PROTECTED] ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237842 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: cffile and names with spaces
Maybe it's the client browser? Or a field wrapped with a urlencodedformat? ;-) That's one reason I'd rather keep the name in the DB and let the file be whatever cffile would like it to be. Don't have to worry about all that stuff, chars that work on one system, but illegal in another, spaces, etc.. Or I run the names through a (poorly formatted ;) regex. Most people haven't even mentioned the spaces that get turned to _ or whatnot. Missing apostrophes... I dunno, this gets into the whole problem with, like, using table_ID and column_IDs for stuff in a DB. You're fine so long as you always access via some type of coded interface, but lo, the day you need to go in and view it with a normal SQL tool... yeeeowzers! LEFT JOIN t_42 ON t_42.e_23 = t_55.e_23... I do appreciate the fact that human readable stuff is more likely to stay around for a while. Eh... back to your regularly schedule talk... ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237843 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Holoday
I guess CF-Talk took a holiday yesterday? ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237844 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Insert SQL Statement
Any suggestions? 1. never use space or special characters in any table or especially column names. Column names are used as variable names in CF and most languages using queries, so better use table and column names compatible with the syntax of the language handling the query. 2. use [...] around table and column names; 3. use aliases to rename the columns so that they can be handled properly by the language, ie: SELECT [poorly named column] AS correctlyNamedColumn FROM [poorly named table]... 4. consider redesigning your db anyway and go back to 1! ;-) -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237845 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: IIF help
Mingo Hagen wrote: no quotes in the first argument. thanks everyone.. the quotes were the issue. Rick ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237846 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Pause?
I believe you're looking for the sleep() method of java.lang.Thread On 4/14/06, Loathe [EMAIL PROTECTED] wrote: If I wanted to say have a template pause for 10 seconds, how would you do that, I mean, I can think of a couple of looping ways that would accomplish about the same thing, but I remember seeing a Java class that does this properly. Ideas? -- Timothy Heald Analyst, Architect, Developer [EMAIL PROTECTED] W: 202-228-8372 C: 703-300-3911 ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237847 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Pause?
Thanks to everyone that helped on this. It's all sorted. Tim -Original Message- From: Rob Wilkerson [mailto:[EMAIL PROTECTED] Sent: Friday, April 14, 2006 2:46 PM To: CF-Talk Subject: Re: Pause? I believe you're looking for the sleep() method of java.lang.Thread On 4/14/06, Loathe [EMAIL PROTECTED] wrote: If I wanted to say have a template pause for 10 seconds, how would you do that, I mean, I can think of a couple of looping ways that would accomplish about the same thing, but I remember seeing a Java class that does this properly. Ideas? -- Timothy Heald Analyst, Architect, Developer [EMAIL PROTECTED] W: 202-228-8372 C: 703-300-3911 ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237848 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: catching a query based cfmail ...
Hmmm... maybe the DAO type-deal, but that's a lot of work. The idea was to do it without looping the query first, so the isValid I don't think would work. The regex I mentioned was basically a way of putting some type of selection in the query itself, saying, Grab me records with valid emails, which I presume the MySQL regex engine is capable of, dunno for sure, and no idea whatsoever about MSSQL and regex. Just spreading out the work load, CF shouldn't have to do it all! ;-) ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237849 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: CF/mysql Datetime Best Practices
uh, cf uses's something like Excel_Time or DB2_Time, it's numeric time unit is *days* since 31-dec-1899 (it's epoch). uh, cf uses's something like Excel_Time or DB2_Time, it's numeric time unit is *days* since 31-dec-1899 (it's epoch). Right. I was talking about Unix's epoch (POSIX time) for date/time (as my first apps were perl on linux), which is manipulated as such: // get datetime int for storage dat = DateDiff(s, January 1 1970 00:00, Now()); // convert an int to whatever date/time format is required LSdateformat(dateadd(s, dat, createdatetime(1970, 1, 1, 0, 0, 0)),mmm dd yy) LStimeformat(dateadd(s, dat, createdatetime(1970, 1, 1, 0, 0, 0))) Works fine, and quite fast if you application cache the createdatetime. I've simply liked to rely as little on proprietry database functions as possible. Time to convert these to mysql DateTimes and use mysql's datetime functions though I reckon. http://en.wikipedia.org/wiki/Unix_timestamp ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237850 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: StructFindKey Path and evaluate
Most likely I missed something, because doesn't structFindKey return a value as well as the path to the key? Unless you're talking about getting the path to another key, not the one you just found.? The native function only works on the keys of an individual structure. The issue Bruce is dealing with is that he's got nested structures, so he's looking for a way to navigate the path from the top to a nested structure. For example: struct [ [cat] [dog] [bird] ] This structure would only need ColdFusion native struct functions like StructFindKey. struct [ [cat[ [large[ [lion] [tiger] [jaguar] ]] ]] ] This nested structure would require a more elaborate solution in order to fetch jaguar from the top. What bruce has is a string representing the path from the top to jaquar, i.e. his string contains the value struct.cat.large.jaguar, at which point he can either use evaluate(string) to return the jaguar variable, or he would need to find a more elaborate solution, because even if he removes struct from the beginning of the string, structKeyFind(struct,string) won't find cat within struct (or cat.large.jaquar because the structure doesn't contain a cat.large.jaguar key, it contains a cat key). s. isaac dealey 434.293.6201 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237851 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: database linking table naming conventions?
Isaac's SQL abstraction layer would probably help in instances like this as well. No need to convert all those TOPs to LIMiTs ;-) (I'm guessing, as I haven't checked it out yet, but it does sound like a good idea). Well it's definitely a trade. :) The abstraction layer is always going to be less efficient than hand-coded ad-hoc SQL. I prefer it because it gives me a level of flexibility (both platform and syntax reuse) that wouldn't be available to me with ad-hoc SQL, but that doesn't necessarily mean it's going to be the right tool for every project. I'm not real certain how it wandered into a discussion of naming conventions. :) I did want to mention that the abstraction layer's application of top or limit functionality isn't unique to the framework. It uses the cfquery tag's maxrows attribute to produce that result, rather than relying on SQL syntax because SQL Server (and possibly others -- I haven't researched it much) doesn't support the standard LIMIT syntax. So that being said, just using ColdFusion gives you that capability. The exception would be with subqueries, but the framework doesn't let you apply top/limit to subqueries, so again in that respect it doesn't provide more than the hand-coded ad-hoc cfquery. s. isaac dealey 434.293.6201 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237852 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: insert a list into database
Sorry, Isaac. You saw what I missed...that John's tbl_list was the name of a single column, not a variable representing a list of columns. And in light of that error on my part, I apologize for my flip response. It's all good. It'd be mighty hipocritical of me to complain about flippant responses. :) s. isaac dealey 434.293.6201 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237853 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Credit Card Info
I've been told that it's illegal to store the Card Security Code (CSC) -- the 3-4 digit number on the back. I hadn't researched and verified that, it's just what I'd heard. :) So if you're storing those or planning to store those, you might want to either confirm or deny the rumor for yourself. The question of whether you should or shouldn't keep anything is a practicality issue. There are quite a few obligations put on you if you store any of the card details in any form - written, electronic or engraved into marble. For example, if you store the card number, and it ends up being stolen, you could be held liable for the losses the cardholder incurs as a result. The terms are outlined in the merchant agreement you signed when you agreed to take on the card merchant facility. In short, if you store anything you have to go to a lot of lengths to protect the data from malicious or accidental interception - separate database server, encryption, secure transmission between servers etc etc.This applies not only to data stored on your web site servers, but also in your accounting system and in local servers. You have to protect the data from being misused by disgruntled or dishonest employees for example or you could possibly be held liable for any losses incurred by the cardholder. The easiest way to honour your obligations for all this is just to not store the info.There's nothing that says you can't store it. Just that if you do store it, you must do everything practical to ensure it's safe from dishonest, negligent or malicous people who might come in contact with it. Your own bank's merchant services people should tell you whether it's ok to store just the last four digits of the number (your rules might be different from ours), but if it's any help, it's acceptable in Australia to store and print the last four digits in the form you outline. Cheers Mike Kear Windsor, NSW, Australia Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month On 4/16/06, Adrian Lynch [EMAIL PROTECTED] wrote: I'm about to create a table to hold credit card booking info and I was wondering what info you can store regarding the card details. I don't keep the CC number, but does anyone know if it's ok to keep part of it so I can show details like CC: 1234? This is a UK based company if it makes a difference. Can anyone point me to any resources about this sort of thing. I've always been under the impression that I shouldn't keep anything. Thanks. Adrian Lynch http://www.halestorm.co.uk/ ~~ ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237854 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Pause?
Here is one way... cfset thread = CreateObject(java, java.lang.Thread) cfset thread.sleep(25000) 25000=???Milliseconds... Aaron Hi Aaron... 25000 is milliseconds yes -- 25 seconds. s. isaac dealey 434.293.6201 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237855 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: OT: Mysql outer join with conditions syntax
MYSQL VERSION FROM (fscd_county x JOIN fscd_client c ON (x.countyid = c.countyid) JOIN fscd_state s on (s.stateid = x.stateid)) LEFT OUTER JOIN fscd_survey u ON c.clientid = u.clientid LEFT OUTER JOIN fscd_post p ON c.clientid = p.clientid WHERE x.active = 1 ANDc.active = 1 AND(p.active = 1 OR p.active is null) AND(u.active = 1 OR u.active is null) !--- Is this the preferred method in Mysql? --- Hi Deanna, I just realized this message didn't seem to reach the list earlier. Have you tried this? FROM fscd_county x JOIN fscd_client c ON (x.countyid = c.countyid) JOIN fscd_state s on (s.stateid = x.stateid) LEFT JOIN fscd_survey u ON (c.clientid = u.clientid and p.active = 1) LEFT JOIN fscd_post p ON (c.clientid = p.clientid and u.active = 1) WHERE x.active = 1 ANDc.active = 1 The extra set of parenthesis around the inner join statements would make me a little leery. Oracle 9i also added support for the standard outer join syntax shown here. Personally I also prefer to always include the parenthesis around the conditions of a join statement for clarity if nothing else. s. isaac dealey 434.293.6201 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237856 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Using first CFC wih 6.1 (TRYING AGAIN)
Could someone please help a newbie in 6.1 to implement my first cfc? I posted this yesterday but it must have got lost in the shuffle when the list was offline. It seems I cannot get it to work without the files argument. I want all the files This is the argument list the cfc uses: AddFiles(zipFilePath [, files, directory, filter, recurse, compression, savePaths]) I am trying to use the zipcfc from the exchange and would Appreciate it if someone could share an example of how to Implement it with example paths, parameters, etc I have on my server. I have put the cfc in my custom tags folder. I want to zip up a complete site for backup purposes. I am calling the cfc from d:\inetpub\wwwroot\back_up_site.cfm The site is at d:\inetpub\wwwroot\demo_site Or if there is a better way please reply. Terry Troxel ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237857 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Using first CFC wih 6.1 (TRYING AGAIN)
I've used ZipFileNew with success, if you can't get what you're currently working with to work, try this instead: http://www.cflib.org/udf.cfm?ID=744 I use it to zip up directories. Adrian -Original Message- From: Terry Troxel [mailto:[EMAIL PROTECTED] Sent: 16 April 2006 17:33 To: CF-Talk Subject: Using first CFC wih 6.1 (TRYING AGAIN) Could someone please help a newbie in 6.1 to implement my first cfc? I posted this yesterday but it must have got lost in the shuffle when the list was offline. It seems I cannot get it to work without the files argument. I want all the files This is the argument list the cfc uses: AddFiles(zipFilePath [, files, directory, filter, recurse, compression, savePaths]) I am trying to use the zipcfc from the exchange and would Appreciate it if someone could share an example of how to Implement it with example paths, parameters, etc I have on my server. I have put the cfc in my custom tags folder. I want to zip up a complete site for backup purposes. I am calling the cfc from d:\inetpub\wwwroot\back_up_site.cfm The site is at d:\inetpub\wwwroot\demo_site Or if there is a better way please reply. Terry Troxel ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237858 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Using first CFC wih 6.1 (TRYING AGAIN)
Adrian, I have that library as well. Please look at my example paths and help me a bit more then just saying use this instead. I would really appreciate the help. -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: Sunday, April 16, 2006 9:39 AM To: CF-Talk Subject: RE: Using first CFC wih 6.1 (TRYING AGAIN) I've used ZipFileNew with success, if you can't get what you're currently working with to work, try this instead: http://www.cflib.org/udf.cfm?ID=744 I use it to zip up directories. Adrian -Original Message- From: Terry Troxel [mailto:[EMAIL PROTECTED] Sent: 16 April 2006 17:33 To: CF-Talk Subject: Using first CFC wih 6.1 (TRYING AGAIN) Could someone please help a newbie in 6.1 to implement my first cfc? I posted this yesterday but it must have got lost in the shuffle when the list was offline. It seems I cannot get it to work without the files argument. I want all the files This is the argument list the cfc uses: AddFiles(zipFilePath [, files, directory, filter, recurse, compression, savePaths]) I am trying to use the zipcfc from the exchange and would Appreciate it if someone could share an example of how to Implement it with example paths, parameters, etc I have on my server. I have put the cfc in my custom tags folder. I want to zip up a complete site for backup purposes. I am calling the cfc from d:\inetpub\wwwroot\back_up_site.cfm The site is at d:\inetpub\wwwroot\demo_site Or if there is a better way please reply. Terry Troxel ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237859 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Credit Card Info
From the VISA CISP Program Overview It is never acceptable for Acquirers, merchants. or service providers to retain CVV2, which consists of the last three digits printed on the signature panel of all Visa Cards, subsequent to transaction authorization. The Visa Operating Regulations prohibit such storage, whether encrypted or unencrypted. Marty On 4/16/06, S. Isaac Dealey [EMAIL PROTECTED] wrote: I've been told that it's illegal to store the Card Security Code (CSC) -- the 3-4 digit number on the back. I hadn't researched and verified that, it's just what I'd heard. :) So if you're storing those or planning to store those, you might want to either confirm or deny the rumor for yourself. The question of whether you should or shouldn't keep anything is a practicality issue. There are quite a few obligations put on you if you store any of the card details in any form - written, electronic or engraved into marble. For example, if you store the card number, and it ends up being stolen, you could be held liable for the losses the cardholder incurs as a result. The terms are outlined in the merchant agreement you signed when you agreed to take on the card merchant facility. In short, if you store anything you have to go to a lot of lengths to protect the data from malicious or accidental interception - separate database server, encryption, secure transmission between servers etc etc.This applies not only to data stored on your web site servers, but also in your accounting system and in local servers. You have to protect the data from being misused by disgruntled or dishonest employees for example or you could possibly be held liable for any losses incurred by the cardholder. The easiest way to honour your obligations for all this is just to not store the info.There's nothing that says you can't store it. Just that if you do store it, you must do everything practical to ensure it's safe from dishonest, negligent or malicous people who might come in contact with it. Your own bank's merchant services people should tell you whether it's ok to store just the last four digits of the number (your rules might be different from ours), but if it's any help, it's acceptable in Australia to store and print the last four digits in the form you outline. Cheers Mike Kear Windsor, NSW, Australia Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month On 4/16/06, Adrian Lynch [EMAIL PROTECTED] wrote: I'm about to create a table to hold credit card booking info and I was wondering what info you can store regarding the card details. I don't keep the CC number, but does anyone know if it's ok to keep part of it so I can show details like CC: 1234? This is a UK based company if it makes a difference. Can anyone point me to any resources about this sort of thing. I've always been under the impression that I shouldn't keep anything. Thanks. Adrian Lynch http://www.halestorm.co.uk/ ~~ ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237860 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Using first CFC wih 6.1 (TRYING AGAIN)
Well looking at this: AddFiles(zipFilePath [, files, directory, filter, recurse, compression, savePaths]) You'll want to pass in the zip file path(where your zip will end up), the directory(path to the directory you want to zip) and recurse(true if you want everything in it). Use cfinvoke to pass in named params. Can we see the code you're using at the moment? Adrian Oh and Terry Troxel said: Or if there is a better way please reply. Which is why I posted the other link :O) -Original Message- From: Terry Troxel [mailto:[EMAIL PROTECTED] Sent: 16 April 2006 17:48 To: CF-Talk Subject: RE: Using first CFC wih 6.1 (TRYING AGAIN) Adrian, I have that library as well. Please look at my example paths and help me a bit more then just saying use this instead. I would really appreciate the help. -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: Sunday, April 16, 2006 9:39 AM To: CF-Talk Subject: RE: Using first CFC wih 6.1 (TRYING AGAIN) I've used ZipFileNew with success, if you can't get what you're currently working with to work, try this instead: http://www.cflib.org/udf.cfm?ID=744 I use it to zip up directories. Adrian -Original Message- From: Terry Troxel [mailto:[EMAIL PROTECTED] Sent: 16 April 2006 17:33 To: CF-Talk Subject: Using first CFC wih 6.1 (TRYING AGAIN) Could someone please help a newbie in 6.1 to implement my first cfc? I posted this yesterday but it must have got lost in the shuffle when the list was offline. It seems I cannot get it to work without the files argument. I want all the files This is the argument list the cfc uses: AddFiles(zipFilePath [, files, directory, filter, recurse, compression, savePaths]) I am trying to use the zipcfc from the exchange and would Appreciate it if someone could share an example of how to Implement it with example paths, parameters, etc I have on my server. I have put the cfc in my custom tags folder. I want to zip up a complete site for backup purposes. I am calling the cfc from d:\inetpub\wwwroot\back_up_site.cfm The site is at d:\inetpub\wwwroot\demo_site Or if there is a better way please reply. Terry Troxel ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237861 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Using first CFC wih 6.1 (TRYING AGAIN)
This is the call inside of cfscript tags in d:\inetpub\wwwroot\zipitup.cfm ZipFileNew(expandPath(gildor.zip),expandPath(/gildor)); This is the call using the zip.cfc called from d:\inetpub\wwwroot\zipper.cfm zip = CreateObject(component, Zip); status=zip.AddFiles(d:\inetpub\wwwroot\gildor1.zip, ,d:\inetpub\wwwroot\gildor\); I am having problems with pathing I am sure and when in the zipcfc I do not declere a files argument it raises a bitch. -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: Sunday, April 16, 2006 10:44 AM To: CF-Talk Subject: RE: Using first CFC wih 6.1 (TRYING AGAIN) Well looking at this: AddFiles(zipFilePath [, files, directory, filter, recurse, compression, savePaths]) You'll want to pass in the zip file path(where your zip will end up), the directory(path to the directory you want to zip) and recurse(true if you want everything in it). Use cfinvoke to pass in named params. Can we see the code you're using at the moment? Adrian Oh and Terry Troxel said: Or if there is a better way please reply. Which is why I posted the other link :O) -Original Message- From: Terry Troxel [mailto:[EMAIL PROTECTED] Sent: 16 April 2006 17:48 To: CF-Talk Subject: RE: Using first CFC wih 6.1 (TRYING AGAIN) Adrian, I have that library as well. Please look at my example paths and help me a bit more then just saying use this instead. I would really appreciate the help. -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: Sunday, April 16, 2006 9:39 AM To: CF-Talk Subject: RE: Using first CFC wih 6.1 (TRYING AGAIN) I've used ZipFileNew with success, if you can't get what you're currently working with to work, try this instead: http://www.cflib.org/udf.cfm?ID=744 I use it to zip up directories. Adrian -Original Message- From: Terry Troxel [mailto:[EMAIL PROTECTED] Sent: 16 April 2006 17:33 To: CF-Talk Subject: Using first CFC wih 6.1 (TRYING AGAIN) Could someone please help a newbie in 6.1 to implement my first cfc? I posted this yesterday but it must have got lost in the shuffle when the list was offline. It seems I cannot get it to work without the files argument. I want all the files This is the argument list the cfc uses: AddFiles(zipFilePath [, files, directory, filter, recurse, compression, savePaths]) I am trying to use the zipcfc from the exchange and would Appreciate it if someone could share an example of how to Implement it with example paths, parameters, etc I have on my server. I have put the cfc in my custom tags folder. I want to zip up a complete site for backup purposes. I am calling the cfc from d:\inetpub\wwwroot\back_up_site.cfm The site is at d:\inetpub\wwwroot\demo_site Or if there is a better way please reply. Terry Troxel ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237862 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Using first CFC wih 6.1 (TRYING AGAIN)
Adrian, I just received a reply back from Artur Kordowski the gentleman who wrote ZipCfc and he showed me The error of my ways. I was neglecting to call the argument names. I am now calling it this way: zip = CreateObject(component, Zip); status=zip.AddFiles(zipfilepath=d:\inetpub\wwwroot\site.zip ,directory=d:\inetpub\wwwroot\demo_site,recurse=yes,sav epaths=yes); It works as he wrote it and I am jazzed. Terry Troxel -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: Sunday, April 16, 2006 10:44 AM To: CF-Talk Subject: RE: Using first CFC wih 6.1 (TRYING AGAIN) Well looking at this: AddFiles(zipFilePath [, files, directory, filter, recurse, compression, savePaths]) You'll want to pass in the zip file path(where your zip will end up), the directory(path to the directory you want to zip) and recurse(true if you want everything in it). Use cfinvoke to pass in named params. Can we see the code you're using at the moment? Adrian Oh and Terry Troxel said: Or if there is a better way please reply. Which is why I posted the other link :O) -Original Message- From: Terry Troxel [mailto:[EMAIL PROTECTED] Sent: 16 April 2006 17:48 To: CF-Talk Subject: RE: Using first CFC wih 6.1 (TRYING AGAIN) Adrian, I have that library as well. Please look at my example paths and help me a bit more then just saying use this instead. I would really appreciate the help. -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: Sunday, April 16, 2006 9:39 AM To: CF-Talk Subject: RE: Using first CFC wih 6.1 (TRYING AGAIN) I've used ZipFileNew with success, if you can't get what you're currently working with to work, try this instead: http://www.cflib.org/udf.cfm?ID=744 I use it to zip up directories. Adrian -Original Message- From: Terry Troxel [mailto:[EMAIL PROTECTED] Sent: 16 April 2006 17:33 To: CF-Talk Subject: Using first CFC wih 6.1 (TRYING AGAIN) Could someone please help a newbie in 6.1 to implement my first cfc? I posted this yesterday but it must have got lost in the shuffle when the list was offline. It seems I cannot get it to work without the files argument. I want all the files This is the argument list the cfc uses: AddFiles(zipFilePath [, files, directory, filter, recurse, compression, savePaths]) I am trying to use the zipcfc from the exchange and would Appreciate it if someone could share an example of how to Implement it with example paths, parameters, etc I have on my server. I have put the cfc in my custom tags folder. I want to zip up a complete site for backup purposes. I am calling the cfc from d:\inetpub\wwwroot\back_up_site.cfm The site is at d:\inetpub\wwwroot\demo_site Or if there is a better way please reply. Terry Troxel ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237863 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Clear or set Achive attribute with CF 6.1
How do you clear or set the archive bit with Coldfusion? Terry Troxel ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237864 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Credit Card Info
Ahh, great, thanks for the clarification Marty. From the VISA CISP Program Overview It is never acceptable for Acquirers, merchants. or service providers to retain CVV2, which consists of the last three digits printed on the signature panel of all Visa Cards, subsequent to transaction authorization. The Visa Operating Regulations prohibit such storage, whether encrypted or unencrypted. Marty On 4/16/06, S. Isaac Dealey [EMAIL PROTECTED] wrote: I've been told that it's illegal to store the Card Security Code (CSC) -- the 3-4 digit number on the back. I hadn't researched and verified that, it's just what I'd heard. :) So if you're storing those or planning to store those, you might want to either confirm or deny the rumor for yourself. s. isaac dealey 434.293.6201 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237865 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Clear or set Achive attribute with CF 6.1
What's an archive bit? -Original Message- From: Terry Troxel [mailto:[EMAIL PROTECTED] Sent: 16 April 2006 20:28 To: CF-Talk Subject: Clear or set Achive attribute with CF 6.1 How do you clear or set the archive bit with Coldfusion? Terry Troxel ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237866 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Big Slow Query
Okay, my SQL Server is at 100% and this query is taking like 40 seconds or something ridiculous like that and its not even full size yet. I need some help! Without explaining how this entire thing works, let me tell you that its a dynamically generated query, where the user creates the clause and adds the AND/OR operator. My query works when run by itself like this Select * from users where userid in ( select o.userid from orders o join orderdetails od on (o.orderid = od.orderid) where realdate BETWEEN '2005-04-01' AND '2006-04-30' ) This query gets all users who have orders in the orders table between two dates. This runs fine. Now, since the end user is building these queries, there might be another part to this query. Like this Select * from users Where ( (badminton = 1 ) ) and ( userid in ( select o.userid from orders o join orderdetails od on (o.orderid = od.orderid) where realdate BETWEEN '2005-04-01' AND '2006-04-30' ) ) This query takes forever to execute, and the user can still add many more statements to this! The reason this query looks strange is because I am building each section of the query seperatly (and me thinks this might be what is causing the query to take soe long), so the first part is this: ( (badminton = 1 ) ) and the second part is ( userid in ( select o.userid from orders o join orderdetails od on (o.orderid = od.orderid) where realdate BETWEEN '2005-04-01' AND '2006-04-30' ) ) Because each chunk is self contained, I can easily build a large query and throw the user defined AND/OR between each chunk to arrive at the final query. But I guess there must be something inherently wrong with using all this parenthesis eh? If any SQL Gurus have some advise about what the heck I am causing to happen on the SQL Server I would love to know. I must be forcing it to do way more work than is nesscary. But I don't know how to avoid it because I am building these queries dynamically. Thanks for the help! Brookd ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237867 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Big Slow Query
Forgive me, I didnt read the entire post, but what seems to be the problem is you are doing a subselect when an inner join will work just fine. You want all users who have orders right? instead of Select * from users where userid in ( select o.userid from orders o join orderdetails od on (o.orderid = od.orderid) where realdate BETWEEN '2005-04-01' AND '2006-04-30' ) Try Select * from users u inner join orders o ON o.userid = u.userid inner JOIN orderdetails od ON (o.orderid = od.orderid) AND realdate BETWEEN '2005-04-01' AND '2006-04-30' This does all logic in the join conditions and should work just fine. The other thing you need to think about is the indexes you have on these tables. Without the proper indexes this query would still run slow. But with the proper indexes this should run without any problem. On 4/16/06, blists [EMAIL PROTECTED] wrote: Okay, my SQL Server is at 100% and this query is taking like 40 seconds or something ridiculous like that and its not even full size yet. I need some help! Without explaining how this entire thing works, let me tell you that its a dynamically generated query, where the user creates the clause and adds the AND/OR operator. My query works when run by itself like this Select * from users where userid in ( select o.userid from orders o join orderdetails od on (o.orderid = od.orderid) where realdate BETWEEN '2005-04-01' AND '2006-04-30' ) This query gets all users who have orders in the orders table between two dates. This runs fine. Now, since the end user is building these queries, there might be another part to this query. Like this Select * from users Where ( (badminton = 1 ) ) and ( userid in ( select o.userid from orders o join orderdetails od on (o.orderid = od.orderid) where realdate BETWEEN '2005-04-01' AND '2006-04-30' ) ) This query takes forever to execute, and the user can still add many more statements to this! The reason this query looks strange is because I am building each section of the query seperatly (and me thinks this might be what is causing the query to take soe long), so the first part is this: ( (badminton = 1 ) ) and the second part is ( userid in ( select o.userid from orders o join orderdetails od on (o.orderid = od.orderid) where realdate BETWEEN '2005-04-01' AND '2006-04-30' ) ) Because each chunk is self contained, I can easily build a large query and throw the user defined AND/OR between each chunk to arrive at the final query. But I guess there must be something inherently wrong with using all this parenthesis eh? If any SQL Gurus have some advise about what the heck I am causing to happen on the SQL Server I would love to know. I must be forcing it to do way more work than is nesscary. But I don't know how to avoid it because I am building these queries dynamically. Thanks for the help! Brookd ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237868 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Big Slow Query
Hi Ryan, The only thing is, what I posted is only part of the query, and by itself it runs fine, but once I combine it with additional statements it gets really slow. The query is dynamically generated based on filters created by the user, so it was easy to build the SQL using sub queries in order to join each chunk together into one big statement without worrying about the dependencies between the selected filters and the resulting query. However, I guess this is not going to fly. I just don't know how I can keep adding onto this query to accommodate additional clauses. For example, if the user wanted to add to this example and also only select users who have purchased from specific suppliers how would I combine the query you did with: Select * from users Where userid in (select o.userid from orders o join orderdetails od on (o.orderid = od.orderid) where productid in (select product_id from products where supplier in (9,2,1) ) ) And I guess, I could work out how to do that if I knew it would only be those two statements but the user could configure this filter to add more clauses in different orders with different operators etc. And so, I need to be able to BUILD the SQL dynamically, which I guess is where it gets difficult. Brookd p.s Sorry for the double post At 12:59 PM 4/16/2006, you wrote: Forgive me, I didnt read the entire post, but what seems to be the problem is you are doing a subselect when an inner join will work just fine. You want all users who have orders right? instead of Select * from users where userid in ( select o.userid from orders o join orderdetails od on (o.orderid = od.orderid) where realdate BETWEEN '2005-04-01' AND '2006-04-30' ) Try Select * from users u inner join orders o ON o.userid = u.userid inner JOIN orderdetails od ON (o.orderid = od.orderid) AND realdate BETWEEN '2005-04-01' AND '2006-04-30' This does all logic in the join conditions and should work just fine. The other thing you need to think about is the indexes you have on these tables. Without the proper indexes this query would still run slow. But with the proper indexes this should run without any problem. On 4/16/06, blists [EMAIL PROTECTED] wrote: Okay, my SQL Server is at 100% and this query is taking like 40 seconds or something ridiculous like that and its not even full size yet. I need some help! Without explaining how this entire thing works, let me tell you that its a dynamically generated query, where the user creates the clause and adds the AND/OR operator. My query works when run by itself like this Select * from users where userid in ( select o.userid from orders o join orderdetails od on (o.orderid = od.orderid) where realdate BETWEEN '2005-04-01' AND '2006-04-30' ) This query gets all users who have orders in the orders table between two dates. This runs fine. Now, since the end user is building these queries, there might be another part to this query. Like this Select * from users Where ( (badminton = 1 ) ) and ( userid in ( select o.userid from orders o join orderdetails od on (o.orderid = od.orderid) where realdate BETWEEN '2005-04-01' AND '2006-04-30' ) ) This query takes forever to execute, and the user can still add many more statements to this! The reason this query looks strange is because I am building each section of the query seperatly (and me thinks this might be what is causing the query to take soe long), so the first part is this: ( (badminton = 1 ) ) and the second part is ( userid in ( select o.userid from orders o join orderdetails od on (o.orderid = od.orderid) where realdate BETWEEN '2005-04-01' AND '2006-04-30' ) ) Because each chunk is self contained, I can easily build a large query and throw the user defined AND/OR between each chunk to arrive at the final query. But I guess there must be something inherently wrong with using all this parenthesis eh? If any SQL Gurus have some advise about what the heck I am causing to happen on the SQL Server I would love to know. I must be forcing it to do way more work than is nesscary. But I don't know how to avoid it because I am building these queries dynamically. Thanks for the help! Brookd ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237872 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe:
Re: Big Slow Query
Jochem, I'm still using SQL Server 7.0. Not sure about the index question and I do not have the execution plan, and the query changes all the time based on what the user selected. Heres a better description of what I am doing: I have a ecommerce store, and I am building an email system for the administrator where they can build some filters to select the campaigns recipients. I have 6 different filter types they can build and then they can join them all together with AND/OR. So far, the only way I can get the data I need is with subqueries and its really slow. I've been thinking how I might use Queries of Queries to do this, but am not sure its possible. The customer can build filters using different options like: 1. Where FIELD equals VALUE This can be any field, a specific operator (eq,neq,gt,lt,in) and a value. This one is pretty straightforward 2. Where customer has/has not purchased products from SUPPLIER Customer selected from a list of suppliers 3. Where customer has/has not purchased within TIMEFRAME Customer enters start date and end date 4. Where customers interest include INTERESTS Customer selected from a list of interests There are a couple of more aswell. Like where the customer has purchased products that belong to a specific sport or category, purchase volume etc. They can create each of these filters and then join them together with AND/OR. So I am dynamically generating the SQL string for each filter and wrapping each one in parenthesis and then joining each clause with the AND/OR. For example, if the user created a interests filter and selected a couple of interests, the query would be built like this: Select * from users Where ( (badminton = 1 and baseball = 1 ) ) This executed fine, however, if they then added a timeframe' filter, it will kill the server and take forever. If I run either one by itself it is fine - but together they take too long. Here is the second query: Select * from users Where ( (badminton = 1 and baseball = 1 ) ) and ( userid in ( select o.userid from orders o join orderdetails od on (o.orderid = od.orderid) where realdate BETWEEN '2005-04-01' AND '2006-04-30' ) ) I think I must be causing something wrong to happen when I add all the parenthesis. I guess the execution plan must have way to many comparisons. And I know this is kind of a sloppy way to write this, but it greatly simplified combining all of the different types of filters and combinations into a query. This query does not need to be blazing fast and is only going to be used to send email campaigns once and a while. But I need to find a way to improve its efficiency while still being able to build the query dynamically... BrookD At 01:18 PM 4/16/2006, you wrote: blists said: Okay, my SQL Server is at 100% and this query is taking like 40 seconds or something ridiculous like that and its not even full size yet. I need some help! Without explaining how this entire thing works You will need to EXPLAIN it for us :) Can you show us the execution plan for your query? Select * from users Where ( (badminton = 1 ) ) and ( userid in ( select o.userid from orders o join orderdetails od on (o.orderid = od.orderid) where realdate BETWEEN '2005-04-01' AND '2006-04-30' ) ) This query takes forever to execute, and the user can still add many more statements to this! Which SQL server are you using and is it capable of using multiple indexes in one scan? Jochem ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237873 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Clear or set Achive attribute with CF 6.1
In the old daysi'm dating myself here ;) in dos when you used xcopy and yes even pkzip you could switch the archive bit/flag on or off. It would allpw you to only back up files that had changed or were new. I am trying to implement that in order to create a zipfile of a website at creation and then only the changed or new new files on a nightly basis to cover my clients butts as my web templates allow them to upload files and create/modify content which then writes static html files. I figure these zips will be small and can be downloaded easily without taxing the resources of the server where they are hosted. I have the zip cfc creating the zips perfectly now in no time at all, but it is the whole kit and kaboodle each time which is why I need the archive bit to work. Terry -Original Message- From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] Sent: Sunday, April 16, 2006 1:26 PM To: CF-Talk Subject: Re: Clear or set Achive attribute with CF 6.1 How do you clear or set the archive bit with Coldfusion? Terry Troxel I believe it's a character in the attributes attribute of the cffile tag, i.e. cffile action=write file=c:\blah.txt attributes=A Offhand I'm not sure what character represents the archive bit. It's not something I've needed to work with explicitly myself, but that's where I'd start looking. Check out the cffile tag in the livedocs: http://livedocs.macromedia.com ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237874 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Problems Stopping and Starting Coldfusion Service (CFMX7)
That didn't work for me, anyone else have any suggestions? Andrew yes i get it too. i get round it by stopping the jrun process in task manager. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237875 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: cfreport builder - page breaks
Hmmm... so no one has any ideas? Is anyone actually using the report builder? I did work out that I could make each page that needed to be a separate page a separate section with a minimum height... but it's a bit hit and miss. If anyone has had experience with using the report builder to make complex reports I'd love to hear what you think about it. Also I'd like to know if other reporting solutions are all that much better - this client doesn't have the budget for Crystal, but I know there are more affordable alternatives. Cheers, K. I'm having some troubles with the report builder. Is it possible to add a manual page break? I'm creating a report that has a cover page and a summary page, then a number of other reports (up to 9) as subreports. The cover page I can create by setting a page break after the report header. But the summary page has me stumped. I'm also not sure, will I be able to specify that each subreport starts on a new page? Is there a better way to do this? I was thinking of creating the individual reports and pages and then stitching the results together with a PDF tool, but I would like the page numbers to be sequential (and correct!) which would make this difficult, I imagine. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237876 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: cfreport builder - page breaks
Why not just use html and css page breaks and count lines in order to calculate the breaks. I realize there are many other options out there, but really CF before all this java, flash, and other fancy expensive gadgets did a pretty darn good job all by itself. And the page break in css has been overlooked a lot and it very powerful. Some of you just might learn some things by looking backwards once in awhile...Take it from this old fartthis is a great place we are in right now and some really cool things are coming down the pike, but don't forget the old ones. Terry -Original Message- From: Kay Smoljak [mailto:[EMAIL PROTECTED] Sent: Sunday, April 16, 2006 5:13 PM To: CF-Talk Subject: Re: cfreport builder - page breaks Hmmm... so no one has any ideas? Is anyone actually using the report builder? I did work out that I could make each page that needed to be a separate page a separate section with a minimum height... but it's a bit hit and miss. If anyone has had experience with using the report builder to make complex reports I'd love to hear what you think about it. Also I'd like to know if other reporting solutions are all that much better - this client doesn't have the budget for Crystal, but I know there are more affordable alternatives. Cheers, K. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237877 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: cfreport builder - page breaks
On 4/17/06, Terry Troxel [EMAIL PROTECTED] wrote: Why not just use html and css page breaks and count lines in order to calculate the breaks. Hi Terry, Are you saying that I can use page-break-before:always inside a tract of html text in the report builder and it will respect that? In the PDF output? I didn't know that, I'm off to try now. -- Kay Smoljak http://kay.zombiecoder.com/ ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237878 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: cfreport builder - page breaks
Sorry Kay, I was meaning use plain jane cfm with querys, grouping, etc and count lines in order to calculate page breaks cfinclude a header, add a page number, Columize your data, hell all the goodies that Crystal does can be done. There is also a prg I haven't used in awhileI think it's htmldoc and if this old head is correct it parses html into pdf and does all the rest. Terry -Original Message- From: Kay Smoljak [mailto:[EMAIL PROTECTED] Sent: Sunday, April 16, 2006 6:43 PM To: CF-Talk Subject: Re: cfreport builder - page breaks On 4/17/06, Terry Troxel [EMAIL PROTECTED] wrote: Why not just use html and css page breaks and count lines in order to calculate the breaks. Hi Terry, Are you saying that I can use page-break-before:always inside a tract of html text in the report builder and it will respect that? In the PDF output? I didn't know that, I'm off to try now. -- Kay Smoljak http://kay.zombiecoder.com/ ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237879 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: cfreport builder - page breaks
On 4/17/06, Terry Troxel [EMAIL PROTECTED] wrote: I was meaning use plain jane cfm with querys, grouping, etc and count lines in order to calculate page breaks cfinclude a header, add a page number, Ah, OK, I see now. Considering that this report will contain 9 other subreports that have already been created with complex grouping and calculations, that's not really a feasible option - it would take me weeks to re-do all the logic in the other reports, and I'm hoping to deliver a rough version of this by the end of today (it's the morning still for me!). I'm a big believer in using the right tool for the job - and while it's been difficult to work with, the report builder *is* designed for building reports. -- Kay Smoljak http://kay.zombiecoder.com/ ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237880 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: cfreport builder - page breaks
Sorry Kay, Hope I didn't waste too much of your time...btw our 4 cats say hello to yours. Terry ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237881 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: cfreport builder - page breaks
On 4/17/06, Terry Troxel [EMAIL PROTECTED] wrote: Hope I didn't waste too much of your time...btw our 4 cats say hello to yours. No worries, don't mind me, the whole report builder thing is making me grumpy - and feline assistance is not helping :) http://flickr.com/photos/kaysmoljak/63589871/in/set-92735/ -- Kay Smoljak http://kay.zombiecoder.com/ ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237882 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
CFMX7 and PDF Generation
Hi folks, I am wondering of anyone in the community has experienced this issue. I have an application that runs a query on our MySQL database and prints out a PDF. The user clicks a link the runs this cfm page which then generates this PDF. We are on a shared host. Every few months (2-3), we get errors and cannot generate PDFs anymore -- so a call to the host and they restart the CF server and then all is well again, PDFs are generated no problem. Is there anything I can do to prevent this? Thanks ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237883 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: CFMX7 and PDF Generation
On 4/17/06, Anthony Crawford [EMAIL PROTECTED] wrote: Hi folks, I am wondering of anyone in the community has experienced this issue. I have an application that runs a query on our MySQL database and prints out a PDF. The user clicks a link the runs this cfm page which then generates this PDF. We are on a shared host. Every few months (2-3), we get errors and cannot generate PDFs anymore -- so a call to the host and they restart the CF server and then all is well again, PDFs are generated no problem. Is there anything I can do to prevent this? Funnily enough, after weeks of developing reports on our test server with no issues, I've had this happen twice this morning (CFMX7 and cfreport, with SQL Server not MySQL). Dunno what caused it though. -- Kay Smoljak http://kay.zombiecoder.com/ ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237884 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
HTML Formatting in the Report Builder
Lots of reporting fun today... In the updated report builder, there's an option in the property inspector for HTML Text Formatting. I've set that to true for a particular text field, but it doesn't seem to be doing anything (paragraph and strong tags are showing up in the text, not being applied). The property is not listed in the report builder's help and there's no mention of it on LiveDocs. Does anyone know anything about this? Is there some magical voodoo way of applying selective bolding to words in a large tract of text? This is for definitions that go along with the report. Thanks, K. -- Kay Smoljak http://kay.zombiecoder.com/ ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237885 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Hosting.
I'm sure this type of question comes up quite often. But does anyone know of any hosts around that have CF plans anywhere near what DreamHost ( www.dreamhost.com) offer? I have been searching high and low for the past two days but their plans seem pretty unbelievable. anyone had any experience with them? TIA. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237886 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: mod_rewrite / ISAPI filter (AKA: search engine friendly urls)
The limitation with that method is you need a .cfm file. You are just exploiting the fact that CF will treat the / the same as a ? before the querystring. It worked on CF5 but I remember having trouble getting BlueDragon to be able to do this. Not sure about MX. On Mon, 10 Apr 2006 10:22:15 -0700, Jordan Michaels [EMAIL PROTECTED] wrote: Christian N. Abad wrote: Forgive me if this is somewhat off topic. (I understand this is not CF specific, but more general.) I have a client that needs to implement mod_rewrite, ISAPI filtering or some other URL filter to allow their websites to be more search engine friendly. One site is written in PHP, the other ASP. (Again, I know these aren't CF sites, but the basic principles should still apply.) Does anyone have experience with this? Can anyone point me in the right direction? Thanks! ~Christian Accessible Computing, Inc. 1210 McLaughlin Drive Charlotte, NC 28212 http://www.accessiblecomputing.com 704.248.8855 (office) 704.248.6682 (fax) Hi Christian, While this can be done using mod_rewrite, etc, you can also do this in the code. Here's an example of how to do it with CFML: http://tutorial90.easycfm.com/ Hope this helps! -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:11:3009 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/11 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:11 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.11 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: mod_rewrite / ISAPI filter (AKA: search engine friendly urls)
There was a problem with this method on when BD 6.0 first came out, but that error was fixed many ages ago. ;) I have several sites that use this on BlueDragon. Hope this helps! -JM Glenn Saunders wrote: The limitation with that method is you need a .cfm file. You are just exploiting the fact that CF will treat the / the same as a ? before the querystring. It worked on CF5 but I remember having trouble getting BlueDragon to be able to do this. Not sure about MX. On Mon, 10 Apr 2006 10:22:15 -0700, Jordan Michaels [EMAIL PROTECTED] wrote: Christian N. Abad wrote: Forgive me if this is somewhat off topic. (I understand this is not CF specific, but more general.) I have a client that needs to implement mod_rewrite, ISAPI filtering or some other URL filter to allow their websites to be more search engine friendly. One site is written in PHP, the other ASP. (Again, I know these aren't CF sites, but the basic principles should still apply.) Does anyone have experience with this? Can anyone point me in the right direction? Thanks! ~Christian Accessible Computing, Inc. 1210 McLaughlin Drive Charlotte, NC 28212 http://www.accessiblecomputing.com 704.248.8855 (office) 704.248.6682 (fax) Hi Christian, While this can be done using mod_rewrite, etc, you can also do this in the code. Here's an example of how to do it with CFML: http://tutorial90.easycfm.com/ Hope this helps! -- Warm regards, Jordan Michaels Vivio Technologies http://www.viviotech.net/ Blue Dragon Alliance Member [EMAIL PROTECTED] ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:11:3010 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/11 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:11 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.11 Donations Support: http://www.houseoffusion.com/tiny.cfm/54