Fwd: Re[2]: IIS 5 WWW-Server and writing of logfiles

2002-03-31 Thread cf-talk

Hello everybody, happy easter.
Thanks for your answers on my issue here.

Due to traffic analysing reasons we don't want to go and observe
45 logfiles or more every logfile representing the same customer.
Most likely we will be merging the 45 different logfiles together with
dos-commands under a batch-file. Hopefully the created logfile after
the merge won't be too big. Thanks again for the ideas what options
I have.

Uwe

===8==Original message text===
Hello Anthony,

Thursday, March 28, 2002, 8:45:50 PM, you wrote:

AD I ended up writing a VB app which parses through both log files, puts them
AD into a database, sorts them, then spits all the records out into one log
AD file. 

AD Upside: It has been working without error for over 6 months.

AD Downside: The bigger the log files, the longer it takes. Our logfiles range
AD from 3000-6000 lines per hourly file and it takes about 5-10 minutes to
AD parse through each one.

AD Tony

AD -Original Message-
AD From: cf-talk [mailto:  
AD Sent: Thursday, March 28, 2002 10:37 AM
AD To: CF-Talk
AD Subject: OT: IIS 5 WWW-Server and writing of logfiles


AD Hi list, is there a way to write under MS-IIS 5 (Win2000) with two virtual
AD domains (One IP, via host-deader) in one (the same) log-file ?
AD I haven't figured out, how to do it, since IIS is installing a new logfile
AD when installing a new virtual domain.
AD Thanks for your ideas.

AD Uwe
AD 
__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CF-Talk-list V1 #228

2002-03-31 Thread ccolon

Thank you for the email.  I am out of the office until Monday April 1st.   I will 
receive your email when I return and respond to you at that time. 

If you have questions while I am out, please feel free to contact Janelle Schneider in 
our Client Services Department.  She can be reached by email at [EMAIL PROTECTED] 
or by phone at 206-548-9295 x10.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: 2 Selects killing me

2002-03-31 Thread Frank Mamone

Hi Micheal,

I had exactly the same problem and was unable to solve it. It expects
something specific from the query. I used their sample table and it works.
When I get my query to return exactly the same thing with my table, the only
difference being an extra ID field. The only thing I can think of is the the
first column must be the primary key.

Please let me know if you find a solution,

Thanks


- Original Message -
From: Michael Ross [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Thursday, March 28, 2002 4:31 PM
Subject: 2 Selects killing me


 I am trying to use the 2 selects and it not working the page just won't
load.  So I know I don't have any bugs just that my query isn't running
right and I am not populating the selects right

 here is my query.  Basically I have a table with lots of records.  Using
the first select box I want to to show only the cpt codes from the 1st boxes
list of locations.  the fees table has a idnumber, the locationid, the cpt
code and some other data.

 CFQUERY NAME=FEES DATASOURCE=#application.dsn#
  SELECT
 tblcorp_fees_location.LOCATION,
 tblcorp_fees_location.LOCATION_NUMBER,
 tblcorp_fees_fees.LOCATION_ID,
 tblcorp_fees_fees.CPT_CODE
  FROM tblcorp_fees_fees INNER JOIN
   tblcorp_fees_location ON
tblcorp_fees_fees.LOCATION_ID = tblcorp_fees_location.LOCATION_NUMBER
 ORDER BY tblcorp_fees_location.LOCATION
 /CFQUERY

 and here is my select boxes

 CF_TwoSelectsRelated
QUERY=FEES
NAME1=LOCATION
NAME2=CPT
DISPLAY1=location
DISPLAY2=cpt_code
VALUE1=location_id
VALUE2=cpt_code
FORCEWIDTH1=70
FORCEWIDTH2=70
SIZE1=1
SIZE2=1
HTMLBETWEEN=BR
AUTOSELECTFIRST=Yes
EMPTYTEXT1=(choose a location)
EMPTYTEXT2=(now choose a cpt code)
FORMNAME=twoselect

 Anyhelp would be appreciated..its been a long day


 thanks

 mike

 
__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CF Can't insertinto SQL2K ... any ideas?

2002-03-31 Thread Bud

On 3/31/02, Mike Kear penned:
Yes, and it doesn't show anything but the error message.  And the memberID
is an identity field.  The SQL2K equivalent of Access's autonumber field. If
you try to enter anything in there yourself it barfs on you.

The SQL inside the CFQUERY tag works fine when sent using Query Analyser.
So the SQL itself is ok.  I'd gladly look at the debug info but the page
doesn't show any.  Doesn't show anything but the error message.

That is strange.

 From before:
IS this the problem??

I'm thinking the problem is the SERVER doesn't have permissions to insert
into the database - it needs to be set up as database owner and hasn't been.
Which means I have to focus the SysAdmin's eye on it and that's not easy at
Easter time.   IS there anything else I should look for?  Something I might
have overlooked?

I would think that if you can insert anything through query analyzer 
then you must have owner or datareader/datawriter permissions.  Just 
for the heck of it, maybe you could try making the memberID field a 
regular integer field and trying an insert with a value for the 
memberID hard coded in the cfquery.

Also, I know this is probably a stupid question, but since it IS an 
identity field, you aren't including that field in your insert 
statement, are you?

If you want to email me off list with the username, password database 
name and IP Address of the SQL Server, along with the query with some 
hard coded values, I can try it from here to see if it works.
-- 

Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CF Can't insertinto SQL2K ... the answer ..

2002-03-31 Thread Mike Kear

Turns out the Sysadmin moved the database to a different ip address.  Didn't
tell me yet.  He assures me he was GOING to!  So I was accessing the old
database with my Query Analyser, fixing problems, setting up tables etc, but
I wasn't making any changes on the database that ColdFusion was accessing.
So no matter what I did, thinking I was fixing the problem, I did nothing of
the kind. No wonder everything I did made no difference.   I'd set up the
table in this example with a teensy error in it, and just at that moment the
Sysadmin moved the ip addresses to the new location.  So I couldn't correct
the error, even though I thought I was.

Thanks everyone for the helpful suggestions, but I bet none of you had
anything close to that in mind!

Cheers,
Mike Kear
Windsor, NSW, Australia
AFP WebWorks


-Original Message-
From: Bud [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 31, 2002 11:39 PM
To: CF-Talk
Subject: RE: CF Can't insertinto SQL2K ... any ideas?

On 3/31/02, Mike Kear penned:
Yes, and it doesn't show anything but the error message.  And the memberID
is an identity field.  The SQL2K equivalent of Access's autonumber field.
If
you try to enter anything in there yourself it barfs on you.

The SQL inside the CFQUERY tag works fine when sent using Query Analyser.
So the SQL itself is ok.  I'd gladly look at the debug info but the page
doesn't show any.  Doesn't show anything but the error message.

That is strange.

 From before:
IS this the problem??

I'm thinking the problem is the SERVER doesn't have permissions to insert
into the database - it needs to be set up as database owner and hasn't
been.
Which means I have to focus the SysAdmin's eye on it and that's not easy at
Easter time.   IS there anything else I should look for?  Something I might
have overlooked?

I would think that if you can insert anything through query analyzer
then you must have owner or datareader/datawriter permissions.  Just
for the heck of it, maybe you could try making the memberID field a
regular integer field and trying an insert with a value for the
memberID hard coded in the cfquery.

Also, I know this is probably a stupid question, but since it IS an
identity field, you aren't including that field in your insert
statement, are you?

If you want to email me off list with the username, password database
name and IP Address of the SQL Server, along with the query with some
hard coded values, I can try it from here to see if it works.
--

Bud Schneehagen - Tropical Web Creations

__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Internationalization

2002-03-31 Thread Eric Dawson

hey we're neighbours! my real home is in Winnipeg.
e

From: Brad Roberts [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Subject: RE: Internationalization
Date: Sun, 31 Mar 2002 00:09:20 -0500

 For example, I
 maintain a second and entirely fake home in Beverley Hills - it's the
 only US zip code I know.

Could it be 90210? ;)

-Brad



__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CF Can't insertinto SQL2K ... the answer ..

2002-03-31 Thread Bud

On 4/1/02, Mike Kear penned:
Turns out the Sysadmin moved the database to a different ip address.  Didn't
tell me yet.  He assures me he was GOING to!  So I was accessing the old
database with my Query Analyser, fixing problems, setting up tables etc, but
I wasn't making any changes on the database that ColdFusion was accessing.
So no matter what I did, thinking I was fixing the problem, I did nothing of
the kind. No wonder everything I did made no difference.   I'd set up the
table in this example with a teensy error in it, and just at that moment the
Sysadmin moved the ip addresses to the new location.  So I couldn't correct
the error, even though I thought I was.

Thanks everyone for the helpful suggestions, but I bet none of you had
anything close to that in mind!

That was going to be my next guess. LOL
-- 

Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Internationalization

2002-03-31 Thread Paul Hastings

btw every locale's guilty of chauvinism, not just us americans i18n
is still a new concept to most companies/developers. 

if you're real serious about this  got the bucks, hire an i18n consultant.

__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Defroster

2002-03-31 Thread Michael Dinowitz

It went out of business for good reason. The product did not translate CF but instead 
created some COM object to mimic the CF features. Rather than a nice and simple CF 
page you now have a single object that is almost impossible to debug and update. 
It would be a great idea if someone with the time and knowledge would write a true 
translator.

 Hi,
 yes Defroster was an application that claimed to convert Cfusion to 
 ASP. I understand it did not do well on code with any degree of 
 compexity; and the company that put it out went out of business 
 about a year ago.
 
 derek n.
 
 On 27 Mar 02, at 8:48, G wrote:
 
 My friend was asking me earlier today about an application called
 Defroster. Says he thought it was a CF to ASP converter program?
 
 Does anyone have any information on this? I'd never heard of it.
 
 Thanks!
 
 Brian
 
 
 
__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Tricky grouping

2002-03-31 Thread W Luke

Hi.

I'm having a bit of a nightmare with Grouping again.  The code below
displays images in rows, left to right, 3 at a time.  It's a template for
the rest of the site.

What I need to do is search a range of columns, and display images under
headings.  EG:

Here are the results found in the description field:

Image 1, 2, 3 etc

Here are the results found in the title field:

Image 1, 2, 3 etc (or none at all..)




Here's the query:

Cfquery name=latestphotos datasource=#application.ds#
SELECT ID,description,title,owner,album,thumb_user_path,
views FROM thumbnailelements
WHERE description like '%#url.rope#%'
OR title like '%#url.rope#%'
OR owner like '%#url.rope#%'
OR album like '%#url.rope#%'
GROUP by description,title,owner,album,ID,thumb_user_path,views
/cfquery

I only really need to display results for the Album, Owner, Title and
Description.  Here's the cfoutput code:

TABLE  cellSpacing=0 cellPadding=0 width=100% border=0


CFOUTPUT group=description QUERY = latestphotos

!--- Determine if this is record 1, 4, 7, etc...---
!--- If so, open the row. ---
CFIF CurrentRow MOD 3 IS 1
tbodyTR
/CFIF

 TD class=dark vAlign=top width=32%

a href=#application.singlephoto#?pid=#id#IMG
class=imgborder src=#thumb_user_path# border=0/a
BRB#title#/B (#views#)br
#owner#
p /p


/TD
TD width=1%IMG height=16 src=imagebin/spacer.gif
  width=16 border=0/TD


!--- Determine if this is record 3, 6, 9, etc... ---
!--- If so, close the row. ---
CFIF CurrentRow MOD 3 IS 0
/TR/tbody
/CFIF
/CFOUTPUT
!--- If the query record count is not equally divisible by 3, ---
!--- the last row was not close. ---
!--- Determine how many more columns are needed, create them ---
!--- and close the row. ---
CFIF latestphotos.RecordCount MOD 3 IS NOT 0
CFSET ColsLeft = 3 - (latestphotos.RecordCount MOD 3)
CFLOOP FROM = 1 TO = #ColsLeft# INDEX = i
TD /TD
/CFLOOP
/TR/tbody
/CFIF
/table

Sorry for the mammoth post - hope someone can advise.

Cheers

Will



__

Try Pingo:

http://www.localbounty.com/pingo
__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Business days from Dates PLEASE HELP!!!!

2002-03-31 Thread Dharmesh Goel

There is a business days calculator on the cflib.org website as a UDF.

--Dharmesh

-Original Message-
From: Scott Van Vliet [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 24, 2002 1:53 AM
To: CF-Talk
Subject: Re: Business days from Dates PLEASE HELP


Steven:

Given that business days are generally monday thru friday, you can use the
code below (where date, daysUntilDue  dueDate would be values from your
database).

cfset date = now()
cfset daysUntilDue = 5
cfset dueDate = dateAdd(d, daysUntilDue, date)

cfset businessDays = 2,3,4,5,6
cfset businessDaysUntilDue = 0

cfloop from=#date# to=#dueDate# index=i
 cfif ListFind(businessDays,dayOfWeek(i))
  cfset businessDaysUntilDue = businessDaysUntilDue + 1
 /cfif
/cfloop

cfoutputbusinessDaysUntilDue: #businessDaysUntilDue#/cfoutput

NOTE that this does not cover holidays (such as the US holidays: President's
Day, Thanksgiving, etc.)  To work with this, you could modify the logic as
follows:

!--- Easter, The Fourth of July, Christmas - Day of the Year ---
cfset holidays = 90,185,359

cfloop from=#date# to=#dueDate# index=i
 cfif ListFind(businessDays,dayOfWeek(i))
  cfif NOT ListFind(holidays,dayOfYear(i))
   cfset businessDaysUntilDue = businessDaysUntilDue + 1
  /cfif
 /cfif
/cfloop

Hope this helps!

- Original Message -
From: LANCASTER, STEVEN M. (JSC-OL) (BAR)
[EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Saturday, March 23, 2002 1:56 PM
Subject: Business days from Dates PLEASE HELP


 I have a Database it has a date in one of the columns. I take that date
and
 another column in the table which is just an integer an use the DateAdd
 function to come up with a second date.

 I have:

 date1, duedate(created from the DateAdd function), days_until_it_is_due

 Now I need to give these people X amount of business days based on
 days_until_it_is_due  to come up with a proper due date. Can anyone please
 help me or tell me where to start..

 Steven Lancaster
 

__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Help With Query

2002-03-31 Thread Frank Mamone

I have a fish databse. One table contains a Fish Database called FishDB. The other 
stores the fish per tank FishINV. So if I add three of the same type of fish I get 
three records in FISHINV records. I did it this way so I can add and remove fish and 
keep details about each fish. They may have the same ID but the comments about each 
one maybe different I am williing to remove this feature. My design may be 
fundamentally wrong but what I'm trying to do is query the FISHINV and get a count of 
each type.

This is the basic query I use:

SELECT A.ID, B.CommonName
FROM FISHINV AS A, FISHDB AS B
WHERE TankId = 2 AND (A.FishID = B.ID);

What can I add to count individual fish?


Would it be better to keep a running count in a field instead

__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Help With Query

2002-03-31 Thread Dina Hess

Frank,

This definitely sounds kinda fishy. ;)

So let's see...you've got FISH and you've got a TANK. Those would each be tables in 
your db. In the FISH table you could include a field called TYPE to designate 
goldfish or whatever. So a sample db design would be:

FISH (FishID, FishType, FishComments, ...)
TANK (TankID, TankOwner, FishID, ...)

Then your query to produce the same type of fish in each tank would be something like 
this:

SELECT f.type, f.comments, t.tankowner
FROM fish f inner join tank t on f.fishid = t.fishid
WHERE f.type = 'goldfish' and t.tankid = 2

To count all of the fish in a particular tank:

SELECT count(*) t.fishid as fish_count
FROM tank t 
WHERE t.tankid = 2

The inner join query assumes an MS Access db.

In answer to your last question, you wouldn't want to store a calculated value in a db 
field. Best to use SQL to perform your calculations like SUM, COUNT, etc.

Hope that helps.

Dina 

  - Original Message - 
  From: Frank Mamone 
  To: CF-Talk 
  Sent: Sunday, March 31, 2002 11:15 AM
  Subject: Help With Query


  I have a fish databse. One table contains a Fish Database called FishDB. The other 
stores the fish per tank FishINV. So if I add three of the same type of fish I get 
three records in FISHINV records. I did it this way so I can add and remove fish and 
keep details about each fish. They may have the same ID but the comments about each 
one maybe different I am williing to remove this feature. My design may be 
fundamentally wrong but what I'm trying to do is query the FISHINV and get a count of 
each type.

  This is the basic query I use:

  SELECT A.ID, B.CommonName
  FROM FISHINV AS A, FISHDB AS B
  WHERE TankId = 2 AND (A.FishID = B.ID);

  What can I add to count individual fish?


  Would it be better to keep a running count in a field instead

  
__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Help With Query

2002-03-31 Thread Frank Mamone

Hi Dina,

This is what I have:


1. FISHDB - Main fish DB. Each Fishs as a category, Subcategory and unique
ID. I have Lookups for the Category and SubCategory. I think this aprt is
fine.

2. TANKS - Stores Tanks by Owner. TankID is unique. I think this is OK.

3. FISHINV - Stroes 1 record for each fish added.

Example if I add 3 Goldfish it will contain three records with essentially
the same information.This may be bad.

Now , I'd like to query FISHINV to output for example:

3 GoldFish
5 Yellows Labs
3 Cobalt Blues

I should be able to remove any qty of a specific fish.

Thanks for your answer. I'll take a closer look and see if it helps me.

Frank

- Original Message -
From: Dina Hess [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Sunday, March 31, 2002 12:57 PM
Subject: Re: Help With Query


 Frank,

 This definitely sounds kinda fishy. ;)

 So let's see...you've got FISH and you've got a TANK. Those would each be
tables in your db. In the FISH table you could include a field called TYPE
to designate goldfish or whatever. So a sample db design would be:

 FISH (FishID, FishType, FishComments, ...)
 TANK (TankID, TankOwner, FishID, ...)

 Then your query to produce the same type of fish in each tank would be
something like this:

 SELECT f.type, f.comments, t.tankowner
 FROM fish f inner join tank t on f.fishid = t.fishid
 WHERE f.type = 'goldfish' and t.tankid = 2

 To count all of the fish in a particular tank:

 SELECT count(*) t.fishid as fish_count
 FROM tank t
 WHERE t.tankid = 2

 The inner join query assumes an MS Access db.

 In answer to your last question, you wouldn't want to store a calculated
value in a db field. Best to use SQL to perform your calculations like SUM,
COUNT, etc.

 Hope that helps.

 Dina

   - Original Message -
   From: Frank Mamone
   To: CF-Talk
   Sent: Sunday, March 31, 2002 11:15 AM
   Subject: Help With Query


   I have a fish databse. One table contains a Fish Database called FishDB.
The other stores the fish per tank FishINV. So if I add three of the same
type of fish I get three records in FISHINV records. I did it this way so I
can add and remove fish and keep details about each fish. They may have the
same ID but the comments about each one maybe different I am williing to
remove this feature. My design may be fundamentally wrong but what I'm
trying to do is query the FISHINV and get a count of each type.

   This is the basic query I use:

   SELECT A.ID, B.CommonName
   FROM FISHINV AS A, FISHDB AS B
   WHERE TankId = 2 AND (A.FishID = B.ID);

   What can I add to count individual fish?


   Would it be better to keep a running count in a field instead


 
__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Help With Query

2002-03-31 Thread Dina Hess

Frank,

Illuminate me. Just out of curiousity, what type of data might you store in the main 
and sub fish categories? 

Dina
  - Original Message - 
  From: Frank Mamone 
  To: CF-Talk 
  Sent: Sunday, March 31, 2002 12:17 PM
  Subject: Re: Help With Query


  Hi Dina,

  This is what I have:


  1. FISHDB - Main fish DB. Each Fishs as a category, Subcategory and unique
  ID. I have Lookups for the Category and SubCategory. I think this aprt is
  fine.

  2. TANKS - Stores Tanks by Owner. TankID is unique. I think this is OK.

  3. FISHINV - Stroes 1 record for each fish added.

  Example if I add 3 Goldfish it will contain three records with essentially
  the same information.This may be bad.

  Now , I'd like to query FISHINV to output for example:

  3 GoldFish
  5 Yellows Labs
  3 Cobalt Blues

  I should be able to remove any qty of a specific fish.

  Thanks for your answer. I'll take a closer look and see if it helps me.

  Frank

  - Original Message -
  From: Dina Hess [EMAIL PROTECTED]
  To: CF-Talk [EMAIL PROTECTED]
  Sent: Sunday, March 31, 2002 12:57 PM
  Subject: Re: Help With Query


   Frank,
  
   This definitely sounds kinda fishy. ;)
  
   So let's see...you've got FISH and you've got a TANK. Those would each be
  tables in your db. In the FISH table you could include a field called TYPE
  to designate goldfish or whatever. So a sample db design would be:
  
   FISH (FishID, FishType, FishComments, ...)
   TANK (TankID, TankOwner, FishID, ...)
  
   Then your query to produce the same type of fish in each tank would be
  something like this:
  
   SELECT f.type, f.comments, t.tankowner
   FROM fish f inner join tank t on f.fishid = t.fishid
   WHERE f.type = 'goldfish' and t.tankid = 2
  
   To count all of the fish in a particular tank:
  
   SELECT count(*) t.fishid as fish_count
   FROM tank t
   WHERE t.tankid = 2
  
   The inner join query assumes an MS Access db.
  
   In answer to your last question, you wouldn't want to store a calculated
  value in a db field. Best to use SQL to perform your calculations like SUM,
  COUNT, etc.
  
   Hope that helps.
  
   Dina
  
 - Original Message -
 From: Frank Mamone
 To: CF-Talk
 Sent: Sunday, March 31, 2002 11:15 AM
 Subject: Help With Query
  
  
 I have a fish databse. One table contains a Fish Database called FishDB.
  The other stores the fish per tank FishINV. So if I add three of the same
  type of fish I get three records in FISHINV records. I did it this way so I
  can add and remove fish and keep details about each fish. They may have the
  same ID but the comments about each one maybe different I am williing to
  remove this feature. My design may be fundamentally wrong but what I'm
  trying to do is query the FISHINV and get a count of each type.
  
 This is the basic query I use:
  
 SELECT A.ID, B.CommonName
 FROM FISHINV AS A, FISHDB AS B
 WHERE TankId = 2 AND (A.FishID = B.ID);
  
 What can I add to count individual fish?
  
  
 Would it be better to keep a running count in a field instead
  
  
   
  
__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Help With Query

2002-03-31 Thread Frank Mamone

OK. Here's an example:

  FishDB Id CategoryID SubCategoryID SciName CommonName Comment
  52 1 1 Anomalochromis thomasi African Butterfly Cichlid


   Id CategoryID SubCategoryID SciName CommonName Comment
  25 1 1 Teleogramma brichardi Brichard's Slender Cichlid




  FishCategory Id Category Comments
  1 Freshwater







  FishSubCategory Id FishSubCategory Category Comment
  1 Cichlids 1 African  American




+++

  FishInv Id TankId FishId
  20 2 52
  21 2 52
  22 2 52
  23 2 25



Given only the Tank ID I want:

3 African Butterfly Cichlid
1 Brichardis Slender Cichlid


Thanks


- Original Message -
From: Dina Hess [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Sunday, March 31, 2002 1:25 PM
Subject: Re: Help With Query


 Frank,

 Illuminate me. Just out of curiousity, what type of data might you store
in the main and sub fish categories?

 Dina
   - Original Message -
   From: Frank Mamone
   To: CF-Talk
   Sent: Sunday, March 31, 2002 12:17 PM
   Subject: Re: Help With Query


   Hi Dina,

   This is what I have:


   1. FISHDB - Main fish DB. Each Fishs as a category, Subcategory and
unique
   ID. I have Lookups for the Category and SubCategory. I think this aprt
is
   fine.

   2. TANKS - Stores Tanks by Owner. TankID is unique. I think this is OK.

   3. FISHINV - Stroes 1 record for each fish added.

   Example if I add 3 Goldfish it will contain three records with
essentially
   the same information.This may be bad.

   Now , I'd like to query FISHINV to output for example:

   3 GoldFish
   5 Yellows Labs
   3 Cobalt Blues

   I should be able to remove any qty of a specific fish.

   Thanks for your answer. I'll take a closer look and see if it helps me.

   Frank



__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Tricky grouping

2002-03-31 Thread Dina Hess

Will,

Try your code using ORDER BY rather than GROUP BY in the query.

Dina
  - Original Message - 
  From: W Luke 
  To: CF-Talk 
  Sent: Sunday, March 31, 2002 11:06 AM
  Subject: Tricky grouping


  Hi.

  I'm having a bit of a nightmare with Grouping again.  The code below
  displays images in rows, left to right, 3 at a time.  It's a template for
  the rest of the site.

  What I need to do is search a range of columns, and display images under
  headings.  EG:

  Here are the results found in the description field:

  Image 1, 2, 3 etc

  Here are the results found in the title field:

  Image 1, 2, 3 etc (or none at all..)




  Here's the query:

  Cfquery name=latestphotos datasource=#application.ds#
  SELECT ID,description,title,owner,album,thumb_user_path,
  views FROM thumbnailelements
  WHERE description like '%#url.rope#%'
  OR title like '%#url.rope#%'
  OR owner like '%#url.rope#%'
  OR album like '%#url.rope#%'
  GROUP by description,title,owner,album,ID,thumb_user_path,views
  /cfquery

  I only really need to display results for the Album, Owner, Title and
  Description.  Here's the cfoutput code:

  TABLE  cellSpacing=0 cellPadding=0 width=100% border=0


  CFOUTPUT group=description QUERY = latestphotos

  !--- Determine if this is record 1, 4, 7, etc...---
  !--- If so, open the row. ---
  CFIF CurrentRow MOD 3 IS 1
  tbodyTR
  /CFIF

   TD class=dark vAlign=top width=32%

  a href=#application.singlephoto#?pid=#id#IMG
  class=imgborder src=#thumb_user_path# border=0/a
  BRB#title#/B (#views#)br
  #owner#
  p /p


  /TD
  TD width=1%IMG height=16 src=imagebin/spacer.gif
width=16 border=0/TD


  !--- Determine if this is record 3, 6, 9, etc... ---
  !--- If so, close the row. ---
  CFIF CurrentRow MOD 3 IS 0
  /TR/tbody
  /CFIF
  /CFOUTPUT
  !--- If the query record count is not equally divisible by 3, ---
  !--- the last row was not close. ---
  !--- Determine how many more columns are needed, create them ---
  !--- and close the row. ---
  CFIF latestphotos.RecordCount MOD 3 IS NOT 0
  CFSET ColsLeft = 3 - (latestphotos.RecordCount MOD 3)
  CFLOOP FROM = 1 TO = #ColsLeft# INDEX = i
  TD /TD
  /CFLOOP
  /TR/tbody
  /CFIF
  /table

  Sorry for the mammoth post - hope someone can advise.

  Cheers

  Will



  __

  Try Pingo:

  http://www.localbounty.com/pingo
  
__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Internationalization

2002-03-31 Thread Derek Nalecki

Good list;
I have just one more point for Paul to consider. Sales taxes. Paul, 
you say you are a maker of a  commerce site. Consider the ability 
to put two tax codes and percentages. In many provices in 
Canada, for example, there is a federal sales tax (GST) and 
provincial sales tax (PST). That is likely to be true for many 
countries with a federal structure.

dn.


On 31 Mar 02, at 1:53, Mike Kear wrote:

I know you're thinking about technical things, but there are some common
errors you can easily make, and a huge number of American companies make
them 


(1) Not all countries have zip codes, and only a few have 5 character
numeric codes.   So don't REQUIRE a 5 numeral zip code.

(2)  Few countries use two characters to name their states/provinces, and
some don't have any such divisions at all.  So don't make your state field
a drop down list consisting of only the 50 US 2character state
abbreviations.

(3).  American 1-800 numbers don't work outside the USA.  So provide a
regular phone number if you're going to put a 1-800 number.

(4)  Only North America has phone numbers in the format (999) 999-.  The
rest of the world has  a dazzling array of formats, and not everyone has
area codes.  So don't use that stupid feature in CF to format a field as a
phone number field.  You're locking non-Canadian and non-US customers out of
that field.   Not everyone has 7 character phone numbers.  Some have 5, some
have 10, some have numbers in between.

(5)  Don't use seasons to describe time.   It's common for American
companies to talk about something being released next spring for example.
But not all countries have 4 seasons.  In the tropics they only have two
seasons (Hong Kong, South East Asia,  North of Australia, Central America
for example).   And anyway when we see this expression here in Australia,
we often think which 'spring'  is it referring to - is it ours or theirs?
Summer in these parts is December-March. And similarly don't use terms
like 1QR or Quarter 2.   The financial year in Australia begins on 1 July.
IN New Zealand it beings 1. April.   Different times in other countries.  So
does the term beginning of 2Qtr mean April, (i.e. beginning of the second
calendar quarter) or September (beginning of second financial quarter in
Australia) or June (beginning of second financial quarter in New Zealand)
etc etc around the world.  Don't be lazy, use the month names and everyone
will know what you mean.

(6) Despite the prevalence of the US Dollar, not everyone wants to deal in
that currency, and anyway, it can be very expensive to convert local
currency to US. (It costs AUD$15 to bank a US cheque in a Australian bank
account for example )   So provide for some way for your customers to pay
you in local currency.  Or make it easy for them to convert.

(7)  Remember that when you send your data across the Atlantic, or the
Pacific Oceans it might well travel 70,000 km before it arrives at the
user's browser. (35,000 up to a satellite and 35,000 down again)  So don't
put huge files in your site - big graphics etc - just because it runs fast
in your home town, doesn't mean it's going to run fast half a world away.
Will your prospective customers in Europe and Asia wait to download that
fancy flash page that you love but which does nothing at all for the
customer?

(8)  I once tried to download some software from a major international
company (who will remain nameless but recently announced a merger with
Compaq) where the registration form had a compulsory field that required a
social security number for pete's sake.   The product was a printer driver -
not a US specific piece of software, but for general release around the
world.  The moron who designed that page hadn't thought for a moment that
there might just be people in the world who didn't have US social security
numbers.   (Like for example ALL of the non-US residents!!)  I had to make
up a social security number, and tinker around with numbers until I invented
one the form liked.   I also had to invent an address because it had a 5
character compulsory zip code so I just took an address from a company's ad
in a magazine.


And this is without even touching the idea of language choices.  It's common
in Europe and Asia for sites to be built in several languages and you choose
on the home page which language you want to see.  This is costly and
duplicates effort to translate your site into other languages, but how many
other customers will you get if you do the translation?


These are just some random thoughts.  I know you were thinking about CF's
Locale setting and similar matters, but perhaps these more general thoughts
might help you too.



Cheers,
Mike Kear
Windsor, NSW, Australia
AFP WebWorks



-Original Message-
From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 30, 2002 1:04 AM
To: CF-Talk
Subject: Internationalization

We are makers of SiteDirector a commerce application and are getting ready
to 

Re: Defroster

2002-03-31 Thread Dick Applebaum

On Sunday, March 31, 2002, at 07:43  AM, Michael Dinowitz wrote:

 It went out of business for good reason. The product did not translate 
 CF but instead created some COM object to mimic the CF features. Rather 
 than a nice and simple CF page you now have a single object that is 
 almost impossible to debug and update.
 It would be a great idea if someone with the time and knowledge would 
 write a true translator.

Ah... but, could you really translate some of the neat things that CF 
does for you... to mention a few:

managing db connections

building dynamic queries

caching queries

Mail, HTTP, LDAP, WDDX, Verity, etc. (without 3rd-party products)

I often use a simple example to show off the benefits of coding in CF 
over ASP.

In CF you can query a database, cache the query, and display the results 
with 2 tags:

cfquery and cfoutput

In ASP, it takes 2 commands just to open the db connection (and you must 
take responsibility for closing it when you are through... a 3rd 
command).

no automatic db connection

awkward code required to build dynamic queries

no built-in ability to cache the query

no automatic looping over a query (ala cfoutput)

And, best of all (IMO) the cf code is less cryptic, easier to write, 
less error-prone,  much more human-readable and much more maintainable 
over time... a real price-performer!

  Perl (or possibly APL) are the only languages (that I am aware of) 
which can do more than cf, with fewer lines of code...  I can write 
that (put your application name here) in 1 line of code!

.. but you need to be lobotomized to read/understand the resultant 
code - or write many, many lines of comments... but, even with comments, 
you still need to spend a lot time to decipher the code if you want to 
understand/change it TIMTOWTDIW... There Is More Than One Way To Do 
It Wrong!

Dick

__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Help With Query

2002-03-31 Thread Dina Hess

Frank,

Try this:

SELECT count(t.id), f.CommonName, s.FishSubCategory
FROM FishDB AS f, FishInv AS t, FishSubCategory AS s
WHERE f.id=t.id And f.id = s.id AND t.TankID=2
GROUP BY f.CommonName, s.FishSubCategory;

Dina




- Original Message - 
  From: Frank Mamone 
  To: CF-Talk 
  Sent: Sunday, March 31, 2002 12:39 PM
  Subject: Re: Help With Query


  OK. Here's an example:

FishDB Id CategoryID SubCategoryID SciName CommonName Comment
52 1 1 Anomalochromis thomasi African Butterfly Cichlid


 Id CategoryID SubCategoryID SciName CommonName Comment
25 1 1 Teleogramma brichardi Brichard's Slender Cichlid


  

FishCategory Id Category Comments
1 Freshwater






  
FishSubCategory Id FishSubCategory Category Comment
1 Cichlids 1 African  American




  +++

FishInv Id TankId FishId
20 2 52
21 2 52
22 2 52
23 2 25



  Given only the Tank ID I want:

  3 African Butterfly Cichlid
  1 Brichardis Slender Cichlid


  Thanks


  - Original Message -
  From: Dina Hess [EMAIL PROTECTED]
  To: CF-Talk [EMAIL PROTECTED]
  Sent: Sunday, March 31, 2002 1:25 PM
  Subject: Re: Help With Query


   Frank,
  
   Illuminate me. Just out of curiousity, what type of data might you store
  in the main and sub fish categories?
  
   Dina
 - Original Message -
 From: Frank Mamone
 To: CF-Talk
 Sent: Sunday, March 31, 2002 12:17 PM
 Subject: Re: Help With Query
  
  
 Hi Dina,
  
 This is what I have:
  
  
 1. FISHDB - Main fish DB. Each Fishs as a category, Subcategory and
  unique
 ID. I have Lookups for the Category and SubCategory. I think this aprt
  is
 fine.
  
 2. TANKS - Stores Tanks by Owner. TankID is unique. I think this is OK.
  
 3. FISHINV - Stroes 1 record for each fish added.
  
 Example if I add 3 Goldfish it will contain three records with
  essentially
 the same information.This may be bad.
  
 Now , I'd like to query FISHINV to output for example:
  
 3 GoldFish
 5 Yellows Labs
 3 Cobalt Blues
  
 I should be able to remove any qty of a specific fish.
  
 Thanks for your answer. I'll take a closer look and see if it helps me.
  
 Frank
  


  
__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Defroster

2002-03-31 Thread Michael Dinowitz

 Ah... but, could you really translate some of the neat things that CF 
 does for you... to mention a few:
Yes.
 
 managing db connections
If you mean the Admin for the db connection names, easily done. You write a custom 
function that reads the DS connection information from a file, DB or registry (like CF 
does) and then does all the connection stuff in the function. Pretty it up and it 
looks like CFQUERY. With the way .net is going to tag based stuff in places, this will 
be really easy to do.
 
 building dynamic queries
See above.
 
 caching queries
A little trickier as I'm not all up on the caching or memory based vars in asp but 
do-able.
 
 Mail, HTTP, LDAP, WDDX, Verity, etc. (without 3rd-party products)
Yes, you'll need the third party stuff but there's ways to hack it. The JRE has a HTTP 
part in it that can mimic CFHTTP in some regards. You may have to specify the use of 
third party pieces though.

Is it all do-able? Yes. Can it be done to look as nice as CF? possibly. Will it need a 
lot of custom code included that may slow down the entire application? probably. Will 
it allow you to write something fast and easy in CF and move it to Asp quickly? Yes. 
Will the final product need to be rewritten and optimised? Definitely.
The power of CF is exactly as you stated, speed and clear reading code. With enough 
time and effort, a lot of asp could be 'hidden' to make it look and act like CF more. 
Same could be done to Perl. It's all a need thing. If you really need it, get someone 
who knows the languages in question or can do some great research and pay for it to be 
done. It'll take a few months for a good programmer to get a production beta out but 
you can have an alpha of a few tags in a week or two. 
 
 I often use a simple example to show off the benefits of coding in CF 
 over ASP.
 
 In CF you can query a database, cache the query, and display the results 
 with 2 tags:
 
 cfquery and cfoutput
 
 In ASP, it takes 2 commands just to open the db connection (and you must 
 take responsibility for closing it when you are through... a 3rd 
 command).
 
 no automatic db connection
 
 awkward code required to build dynamic queries
 
 no built-in ability to cache the query
 
 no automatic looping over a query (ala cfoutput)
 
 And, best of all (IMO) the cf code is less cryptic, easier to write, 
 less error-prone,  much more human-readable and much more maintainable 
 over time... a real price-performer!
 
   Perl (or possibly APL) are the only languages (that I am aware of) 
 which can do more than cf, with fewer lines of code...  I can write 
 that (put your application name here) in 1 line of code!
 
 .. but you need to be lobotomized to read/understand the resultant 
 code - or write many, many lines of comments... but, even with comments, 
 you still need to spend a lot time to decipher the code if you want to 
 understand/change it TIMTOWTDIW... There Is More Than One Way To Do 
 It Wrong!
 
 Dick
 
 
__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



hosting

2002-03-31 Thread Heidi Belal

Hi All,
was just wondering if anybody had any comments on
web-x.com hosting services. Good/bad, reliable/not,
up-time? support? etc...
Thanks,
Heidi

=
Heidi Belal
www.code-corner.com
ICQ# 32127109

A bus stops at a bus station.
A train stops at a train station.  On my desk
I have a work station...

__
Do You Yahoo!?
Yahoo! Greetings - send holiday greetings for Easter, Passover
http://greetings.yahoo.com/
__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Multiple File Upload

2002-03-31 Thread Derek Nalecki

This is not slick, because the user has to do a browse for every file he 
wants to upload; but it works without java. If you want, you can use 
javascript dynamically change the filelist, instead of reloading the input 
page. Use divs and something like this:

function writetext(lay,txt) {
if (isIE4) {
document.all[lay].innerHTML = txt;
}
if (isNS4) { 
document[lay].document.write(txt);
document[lay].document.close();
}
if (isDOM) { 
over = document.getElementById([lay]);
range = document.createRange();
range.setStartBefore(over);
domfrag = range.createContextualFragment(txt);
while (over.hasChildNodes()) {
over.removeChild(over.lastChild);
}
over.appendChild(domfrag);
}
}

--

cfparam name=files2upload default=1
..
table...
form ... action=index.cfm...
input type=hidden name=action value=[runthisform]
trtdselect number of files/td
  tdselect name=files2upload onchange=[submit]
 option value=11/option
 .
 /select/td
/form
/tr
/table
..
table ...
form ... action=index.cfm...
input type=hidden name=action value=[uploadfiles]
CFLOOP INDEX=filecount FROM=1 TO=#files2upload#
trtd rowcount=#files2upload#
tdinput type=file name=ufilename#filecount#
/tr
/CFLOOP
input type=hidden name=filecount 
value=#files2upload#
/form
/table
..



The upload cfm:

cfloop index=cfilelocal from=1 
to=#form.filecount#
cfif Evaluate(form.ufilename#cfilelocal#) is not 
CFFILE ACTION=Upload
FILEFIELD=ufilename#cfilelocal#
DESTINATION=#varloaddirectory#
NAMECONFLICT=Overwrite
/cfif
/cfloop




On 21 Mar 02, at 13:00, James Taavon wrote:

Jumping in on this thread...

What if you did not know the number of mutiple files and wanted to make it
dynamic via select box, say 1-5? I know Javascript is the anser, but I have
never done anything like that. Do you know of anybody that has?



-Original Message-
From: Dave Hannum [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2002 11:27 AM
To: CF-Talk
Subject: Re: Multiple File Upload


Multiple File fields with different names and a CFFILE for each..

Dave


- Original Message -
From: Owen Leonard [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Thursday, March 21, 2002 11:08 AM
Subject: Re: Multiple File Upload


 I need to have a multiple file upload.

I've only ever heard two answers to this:

1. Some kind of custom Active-X somethingorother.
2. Multiple file input fields, followed by looping over cffile.

I'd certainly be interested if anyone has any better solutions.

-- Owen


Athens County Library Services
http://www.athenscounty.lib.oh.us





__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Help With Query

2002-03-31 Thread Dina Hess

Whoops! You'll need to change that query slightly to pull your count out...

First line should be:

Select count(t.id) as FishCount,...

And if you have a *lot* of fish in an MS Access db, you'll probably want to change the 
inner join syntax to increase performance (I did it the lazy way grin).
  - Original Message - 
  From: Dina Hess 
  To: CF-Talk 
  Sent: Sunday, March 31, 2002 1:53 PM
  Subject: Re: Help With Query


  Frank,

  Try this:

  SELECT count(t.id), f.CommonName, s.FishSubCategory
  FROM FishDB AS f, FishInv AS t, FishSubCategory AS s
  WHERE f.id=t.id And f.id = s.id AND t.TankID=2
  GROUP BY f.CommonName, s.FishSubCategory;

  Dina




  - Original Message - 
From: Frank Mamone 
To: CF-Talk 
Sent: Sunday, March 31, 2002 12:39 PM
Subject: Re: Help With Query


OK. Here's an example:

  FishDB Id CategoryID SubCategoryID SciName CommonName Comment
  52 1 1 Anomalochromis thomasi African Butterfly Cichlid


   Id CategoryID SubCategoryID SciName CommonName Comment
  25 1 1 Teleogramma brichardi Brichard's Slender Cichlid




  FishCategory Id Category Comments
  1 Freshwater







  FishSubCategory Id FishSubCategory Category Comment
  1 Cichlids 1 African  American




+++

  FishInv Id TankId FishId
  20 2 52
  21 2 52
  22 2 52
  23 2 25



Given only the Tank ID I want:

3 African Butterfly Cichlid
1 Brichardis Slender Cichlid


Thanks


- Original Message -
From: Dina Hess [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Sunday, March 31, 2002 1:25 PM
Subject: Re: Help With Query


 Frank,

 Illuminate me. Just out of curiousity, what type of data might you store
in the main and sub fish categories?

 Dina
   - Original Message -
   From: Frank Mamone
   To: CF-Talk
   Sent: Sunday, March 31, 2002 12:17 PM
   Subject: Re: Help With Query


   Hi Dina,

   This is what I have:


   1. FISHDB - Main fish DB. Each Fishs as a category, Subcategory and
unique
   ID. I have Lookups for the Category and SubCategory. I think this aprt
is
   fine.

   2. TANKS - Stores Tanks by Owner. TankID is unique. I think this is OK.

   3. FISHINV - Stroes 1 record for each fish added.

   Example if I add 3 Goldfish it will contain three records with
essentially
   the same information.This may be bad.

   Now , I'd like to query FISHINV to output for example:

   3 GoldFish
   5 Yellows Labs
   3 Cobalt Blues

   I should be able to remove any qty of a specific fish.

   Thanks for your answer. I'll take a closer look and see if it helps me.

   Frank




  
__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Defroster

2002-03-31 Thread Dick Applebaum

On Sunday, March 31, 2002, at 12:06  PM, Michael Dinowitz wrote:

comments interspersed below:

 Ah... but, could you really translate some of the neat things that CF
 does for you... to mention a few:
 Yes.

 managing db connections
 If you mean the Admin for the db connection names, easily done. You 
 write a custom function that reads the DS connection information from a 
 file, DB or registry (like CF does) and then does all the connection 
 stuff in the function. Pretty it up and it looks like CFQUERY. With the 
 way .net is going to tag based stuff in places, this will be really 
 easy to do.

 building dynamic queries
 See above.

 caching queries
 A little trickier as I'm not all up on the caching or memory based vars 
 in asp but do-able.

 Mail, HTTP, LDAP, WDDX, Verity, etc. (without 3rd-party products)
 Yes, you'll need the third party stuff but there's ways to hack it. The 
 JRE has a HTTP part in it that can mimic CFHTTP in some regards. You 
 may have to specify the use of third party pieces though.

 Is it all do-able? Yes. Can it be done to look as nice as CF? possibly. 
 Will it need a lot of custom code included that may slow down the 
 entire application? probably. Will it allow you to write something fast 
 and easy in CF and move it to Asp quickly?

I generally agree with all the above! The last point, IMO, is the most 
compelling reason for a translator like defroster... we often have no 
choice in the language for programming a target site.  If we already 
have a similar app written in CF, why not use a translator or sift 
program to avoid recoding from scratch... I'm for it (with 
qualifications, see below)

 Yes. Will the final product need to be rewritten and optimised? 
 Definitely.

In my experience, here is the real downside... I agree that a rewrite of 
the translated code is almost always necessary.  But, for reasons of 
time and cost, the rewrite seldom is done,,,

The translated application takes on a life of its own, and we have a 
bunch of manufactured code that is largely uncommented (or carries 
over cf comments that have limited meaning in ASP).

Now, over time this translated, un-commented, un-optimized program(s) 
gets modified by one or more programmers... it eventually degrades to an 
un-usable, un-maintainable, un-godly mess... Y2K was a recent example.

An alternative would be to write an ASP (or php, or whatever) program 
that reads CF templates and emulates them in the target language... at 
least you preserve the readability  maintainability of the CF code.

This certainly would not be as efficient as a translated, rewritten, and 
optimized program,,, but realistically,  that isn't going to happen 
anyway,

With technology ever advancing, we can address the efficiency with 
increased memory, gigahertz and bandwidth.

Dick

 The power of CF is exactly as you stated, speed and clear reading code. 
 With enough time and effort, a lot of asp could be 'hidden' to make it 
 look and act like CF more. Same could be done to Perl. It's all a need 
 thing. If you really need it, get someone who knows the languages in 
 question or can do some great research and pay for it to be done. It'll 
 take a few months for a good programmer to get a production beta out 
 but you can have an alpha of a few tags in a week or two.

 I often use a simple example to show off the benefits of coding in CF
 over ASP.

 In CF you can query a database, cache the query, and display the 
 results
 with 2 tags:

 cfquery and cfoutput

 In ASP, it takes 2 commands just to open the db connection (and you 
 must
 take responsibility for closing it when you are through... a 3rd
 command).

 no automatic db connection

 awkward code required to build dynamic queries

 no built-in ability to cache the query

 no automatic looping over a query (ala cfoutput)

 And, best of all (IMO) the cf code is less cryptic, easier to write,
 less error-prone,  much more human-readable and much more maintainable
 over time... a real price-performer!

   Perl (or possibly APL) are the only languages (that I am aware of)
 which can do more than cf, with fewer lines of code...  I can write
 that (put your application name here) in 1 line of code!

 .. but you need to be lobotomized to read/understand the resultant
 code - or write many, many lines of comments... but, even with 
 comments,
 you still need to spend a lot time to decipher the code if you want to
 understand/change it TIMTOWTDIW... There Is More Than One Way To 
 Do
 It Wrong!

 Dick


 
__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Defroster

2002-03-31 Thread Dick Applebaum

On Sunday, March 31, 2002, at 12:06  PM, Michael Dinowitz wrote:


 The power of CF is exactly as you stated, speed and clear reading code. 
 With enough time and effort, a lot of asp could be 'hidden' to make it 
 look and act like CF more. Same could be done to Perl. It's all a need 
 thing. If you really need it, get someone who knows the languages in 
 question or can do some great research and pay for it to be done. It'll 
 take a few months for a good programmer to get a production beta out 
 but you can have an alpha of a few tags in a week or two.


Ummm,.. an ASP or Perl expert could repackage their environment to make 
it more usable to the less technical among us...

Isn't that, in fact, what MM is doing with Java, and Apple with Unix?

Don't mean to change the subject, but the parallels are interesting.

Dick

__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Defroster

2002-03-31 Thread Jeffry Houser

Ummm,.. an ASP or Perl expert could repackage their environment to make
it more usable to the less technical among us...

Isn't that, in fact, what MM is doing with Java, and Apple with Unix?

  This is definitely what MM is doing with Java for NEO.
  One could say that it is what they did for past versions of CF using NEO.
  One could even say that it is what ASP did for [whatever language ASP was 
written in too].
  One could even say that the Windows API does this for Assembler Language.
  etc.. etc.. etc..

  Conceptually, this is not hard.  Implementation is not trivial, though 
(NEO has been in the works for over 2 years).



--
Jeffry Houser | mailto:[EMAIL PROTECTED]
Need a Web Developer?  Contact me!
AIM: Reboog711  | Fax / Phone: 860-223-7946
--
My Books: http://www.instantcoldfusion.com
My Band: http://www.farcryfly.com 

__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Data Ignored Error

2002-03-31 Thread Jochem van Dieten

Gregory Taylor wrote:
 For the past week or so I've been experiencing a very strange error that I've never 
seen before.
 
 Error,TID=1376,03/27/02,15:31:40,Web server provided content data when none 
was expected. Data ignored.
 
 My first inclination is that someone has somehow spoofed my page and are trying to 
access the database directly. When
 I compare the error message to my server logs there doesn't seem to be anyone logged 
in and accessing any strange
 pages or information.
 
 Has anyone else experienced this type of error before?

No. But I suspect you can recreate it using telnet by doing a request 
without a content length but with a HTTP body, in which case it would 
probably be a browser error. Just try and find out.

Jochem


__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Tricky grouping

2002-03-31 Thread W Luke

- Original Message - 
From: Dina Hess [EMAIL PROTECTED]
Newsgroups: cf-talk
Sent: Sunday, March 31, 2002 7:51 PM
Subject: Re: Tricky grouping


 Will,
 
 Try your code using ORDER BY rather than GROUP BY in the query.

Thanks Dina I'll have a look at that

Will



__

Try Pingo:

http://www.localbounty.com/pingo
__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



ALTERing Access DB

2002-03-31 Thread W Luke

Hi.

V simple - just need to add a date/time column to a table - I've tried the
below, with no luck.  Where am I going wrong?

cfquery name=addit datasource=#application.ds#
ALTER TABLE Members
(ADD COLUMN LasttLogin date)
/cfquery

Thanks

Will



__

Try Pingo:

http://www.localbounty.com/pingo
__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Defroster

2002-03-31 Thread Michael Dinowitz

For a very good reason. To create the system I described is simple to do and the 
results will be just that; simple. To have a true integration of technologies, 
especially when one of them is a technology to make coding easier (CF), takes time and 
effort. In the long run it pays off handsomely. CF MX (already mentioned under that 
name in press releases) is not just CF slapped over Java but a true easy to use 
'portal' into Java. It's going to (and does) rock. 
 
   Conceptually, this is not hard.  Implementation is not trivial, though 
 (NEO has been in the works for over 2 years).
 
 
 
 --
 Jeffry Houser | mailto:[EMAIL PROTECTED]
 Need a Web Developer?  Contact me!
 AIM: Reboog711  | Fax / Phone: 860-223-7946
 --
 My Books: http://www.instantcoldfusion.com
 My Band: http://www.farcryfly.com 
 
 
__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Defroster

2002-03-31 Thread Dick Applebaum

On Sunday, March 31, 2002, at 01:53  PM, Michael Dinowitz wrote:

 For a very good reason. To create the system I described is simple to 
 do and the results will be just that; simple. To have a true 
 integration of technologies, especially when one of them is a 
 technology to make coding easier (CF), takes time and effort. In the 
 long run it pays off handsomely. CF MX (already mentioned under that 
 name in press releases) is not just CF slapped over Java but a true 
 easy to use 'portal' into Java. It's going to (and does) rock.

If MM can truly provide a 'portal' into Java (programming and 
facilities) and, at the same time, hide the complexity... then they will 
have really accomplished something notable!   It would be analogous to 
server-side programming what Swing has done for the Java GUI.

Sigh... I wish there were a comparable 'portal' for stand-alone 
(desktop) Java programming.

What does the MX in CF MX and Flash MX stand for?   Seriously!

TIA

Dick

P.S.  Interesting thread for a lazy Sunday afternoon

__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: ALTERing Access DB

2002-03-31 Thread Owen Leonard

 cfquery name=addit datasource=#application.ds#
 ALTER TABLE Members
 (ADD COLUMN LasttLogin date)
 /cfquery

V simple - you don't need the parentheses, and the term is 'DateTime':

cfquery name=addit datasource=#application.ds#
 ALTER TABLE Members
 ADD COLUMN LastLogin DateTime
/cfquery

-- Owen

Athens County Library Services
http://www.athenscounty.lib.oh.us 
__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: ALTERing Access DB

2002-03-31 Thread Dina Hess

What database are you using?
  - Original Message - 
  From: W Luke 
  To: CF-Talk 
  Sent: Sunday, March 31, 2002 3:46 PM
  Subject: ALTERing Access DB


  Hi.

  V simple - just need to add a date/time column to a table - I've tried the
  below, with no luck.  Where am I going wrong?

  cfquery name=addit datasource=#application.ds#
  ALTER TABLE Members
  (ADD COLUMN LasttLogin date)
  /cfquery

  Thanks

  Will



  __

  Try Pingo:

  http://www.localbounty.com/pingo
  
__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: ALTERing Access DB

2002-03-31 Thread Dina Hess

Guess I should have read the subject line :)

Try this:

alter table members add lastlogin date


  - Original Message - 
  From: Dina Hess 
  To: CF-Talk 
  Sent: Sunday, March 31, 2002 4:31 PM
  Subject: Re: ALTERing Access DB


  What database are you using?
- Original Message - 
From: W Luke 
To: CF-Talk 
Sent: Sunday, March 31, 2002 3:46 PM
Subject: ALTERing Access DB


Hi.

V simple - just need to add a date/time column to a table - I've tried the
below, with no luck.  Where am I going wrong?

cfquery name=addit datasource=#application.ds#
ALTER TABLE Members
(ADD COLUMN LasttLogin date)
/cfquery

Thanks

Will



__

Try Pingo:

http://www.localbounty.com/pingo

  
__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



HTML within forms - specifically a textarea tag within a textarea element!

2002-03-31 Thread brook

Hello,

I have a text area form element which allows a user to enter html. If they 
enter a textarea tag within their html, and the form is then shown 
pre-populated with their data (which contains the textarea/textarea 
tags), my textarea ends when it encounters THEIR end textarea tag!

I can't simple use htmlencoded because this would submit incorrectly 
formatted html data with the form. Has any one had this problem before? 
Should I simply treat the textarea as a special character and replace it 
when displayed with the htmlencoded equivalent. Or is there a solution 
which would catch all html tag related issues within a textarea display?

Did that make sense? :)

Brook


__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: HTML within forms - specifically a textarea tag within a textarea element!

2002-03-31 Thread Dick Applebaum

Replacewith lt;

On Sunday, March 31, 2002, at 04:22  PM, brook wrote:

 Hello,

 I have a text area form element which allows a user to enter html. If 
 they
 enter a textarea tag within their html, and the form is then shown
 pre-populated with their data (which contains the textarea/textarea
 tags), my textarea ends when it encounters THEIR end textarea tag!

 I can't simple use htmlencoded because this would submit incorrectly
 formatted html data with the form. Has any one had this problem before?
 Should I simply treat the textarea as a special character and replace it
 when displayed with the htmlencoded equivalent. Or is there a solution
 which would catch all html tag related issues within a textarea display?

 Did that make sense? :)

 Brook


 
__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



OT: database design question re:product price changes

2002-03-31 Thread Kola Oyedeji

Hi

I have a table which holds orders. The productid and the quantity of items
purchased are held in this table amongst other things such as the order
date, customer id etc. Orders are calculated by getting the product cost and
multiplying it by quantity. Its occured to me that if the price of items
changes,because the total of an order is always calculated the order total
for previous orders will change. IS there any better way to store orders and
price info or should I also store the current price of each product when the
order is made in the order table - wouldn't this lead to data being
duplicated?

Thanks in avance

Kola

__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: OT: database design question re:product price changes

2002-03-31 Thread Dick Applebaum

You conceptually have 2 different prices

1 The Current Price usually stored in the Product File

2 The Order price (The Current Price when this order was filled) 
usually
  stored in an order item file along with Qty (extended Item 
Amount Optional)


1. is a status field and can change at any time

2. Is a history field and Never changes *

+ Order adjustment transactions (separate transactions) are used to 
correct errors in 2 (and preserve an audit
trail)

If you store completed orders in the DB the order items should carry 
price 2

HTH

Dick



On Sunday, March 31, 2002, at 04:38  PM, Kola Oyedeji wrote:

 Hi

 I have a table which holds orders. The productid and the quantity of 
 items
 purchased are held in this table amongst other things such as the order
 date, customer id etc. Orders are calculated by getting the product 
 cost and
 multiplying it by quantity. Its occured to me that if the price of items
 changes,because the total of an order is always calculated the order 
 total
 for previous orders will change. IS there any better way to store 
 orders and
 price info or should I also store the current price of each product 
 when the
 order is made in the order table - wouldn't this lead to data being
 duplicated?

 Thanks in avance

 Kola

 
__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Help With Query

2002-03-31 Thread Frank Mamone

Can't pull out count for each individual FishID. I tried grouping using the
Group attribute in CFQUERY and the grouping of course works, but all I'm
missing is the SUM for each group.

Is there a function to sum items in a group?


- Original Message -
From: Dina Hess [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Sunday, March 31, 2002 3:38 PM
Subject: Re: Help With Query


 Whoops! You'll need to change that query slightly to pull your count
out...

 First line should be:

 Select count(t.id) as FishCount,...

 And if you have a *lot* of fish in an MS Access db, you'll probably want
to change the inner join syntax to increase performance (I did it the lazy
way grin).
   - Original Message -
   From: Dina Hess
   To: CF-Talk
   Sent: Sunday, March 31, 2002 1:53 PM
   Subject: Re: Help With Query


   Frank,

   Try this:

   SELECT count(t.id), f.CommonName, s.FishSubCategory
   FROM FishDB AS f, FishInv AS t, FishSubCategory AS s
   WHERE f.id=t.id And f.id = s.id AND t.TankID=2
   GROUP BY f.CommonName, s.FishSubCategory;

   Dina




   - Original Message -
 From: Frank Mamone
 To: CF-Talk
 Sent: Sunday, March 31, 2002 12:39 PM
 Subject: Re: Help With Query


 OK. Here's an example:

   FishDB Id CategoryID SubCategoryID SciName CommonName Comment
   52 1 1 Anomalochromis thomasi African Butterfly Cichlid


Id CategoryID SubCategoryID SciName CommonName Comment
   25 1 1 Teleogramma brichardi Brichard's Slender Cichlid


 

   FishCategory Id Category Comments
   1 Freshwater






 
   FishSubCategory Id FishSubCategory Category Comment
   1 Cichlids 1 African  American




 +++

   FishInv Id TankId FishId
   20 2 52
   21 2 52
   22 2 52
   23 2 25



 Given only the Tank ID I want:

 3 African Butterfly Cichlid
 1 Brichardis Slender Cichlid


 Thanks


 - Original Message -
 From: Dina Hess [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Sunday, March 31, 2002 1:25 PM
 Subject: Re: Help With Query


  Frank,
 
  Illuminate me. Just out of curiousity, what type of data might you
store
 in the main and sub fish categories?
 
  Dina
- Original Message -
From: Frank Mamone
To: CF-Talk
Sent: Sunday, March 31, 2002 12:17 PM
Subject: Re: Help With Query
 
 
Hi Dina,
 
This is what I have:
 
 
1. FISHDB - Main fish DB. Each Fishs as a category, Subcategory
and
 unique
ID. I have Lookups for the Category and SubCategory. I think this
aprt
 is
fine.
 
2. TANKS - Stores Tanks by Owner. TankID is unique. I think this
is OK.
 
3. FISHINV - Stroes 1 record for each fish added.
 
Example if I add 3 Goldfish it will contain three records with
 essentially
the same information.This may be bad.
 
Now , I'd like to query FISHINV to output for example:
 
3 GoldFish
5 Yellows Labs
3 Cobalt Blues
 
I should be able to remove any qty of a specific fish.
 
Thanks for your answer. I'll take a closer look and see if it
helps me.
 
Frank
 




 
__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CF-Talk-list V1 #229

2002-03-31 Thread ccolon

Thank you for the email.  I am out of the office until Monday April 1st.   I will 
receive your email when I return and respond to you at that time. 

If you have questions while I am out, please feel free to contact Janelle Schneider in 
our Client Services Department.  She can be reached by email at [EMAIL PROTECTED] 
or by phone at 206-548-9295 x10.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: OT: database design question re:product price changes

2002-03-31 Thread Tony Schreiber

Agreed. Store the price the product was sold at in your orderitem table.

 You conceptually have 2 different prices

   1 The Current Price usually stored in the Product File

   2 The Order price (The Current Price when this order was filled)
 usually
   stored in an order item file along with Qty (extended Item
 Amount Optional)


 1. is a status field and can change at any time

 2. Is a history field and Never changes *

 + Order adjustment transactions (separate transactions) are used to
 correct errors in 2 (and preserve an audit
 trail)

 If you store completed orders in the DB the order items should carry
 price 2

 HTH

 Dick



 On Sunday, March 31, 2002, at 04:38  PM, Kola Oyedeji wrote:

  Hi
 
  I have a table which holds orders. The productid and the quantity of
  items
  purchased are held in this table amongst other things such as the order
  date, customer id etc. Orders are calculated by getting the product
  cost and
  multiplying it by quantity. Its occured to me that if the price of items
  changes,because the total of an order is always calculated the order
  total
  for previous orders will change. IS there any better way to store
  orders and
  price info or should I also store the current price of each product
  when the
  order is made in the order table - wouldn't this lead to data being
  duplicated?
 
  Thanks in avance
 
  Kola
 
 
 
__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: database design question re:product price changes

2002-03-31 Thread nagraj

Hi Kola Oyedeji,


  You Can Store the Product Price in orders table as it will save you from
making joins which is more overhead  then
querying same table and having the prices in it.


With Regards
Nagaraj.A

- Original Message -
From: Kola Oyedeji [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Monday, April 01, 2002 6:08 AM
Subject: OT: database design question re:product price changes


 Hi

 I have a table which holds orders. The productid and the quantity of items
 purchased are held in this table amongst other things such as the order
 date, customer id etc. Orders are calculated by getting the product cost
and
 multiplying it by quantity. Its occured to me that if the price of items
 changes,because the total of an order is always calculated the order total
 for previous orders will change. IS there any better way to store orders
and
 price info or should I also store the current price of each product when
the
 order is made in the order table - wouldn't this lead to data being
 duplicated?

 Thanks in avance

 Kola

 
__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: database design question re:product price changes

2002-03-31 Thread nagraj

Hello Kola Oyedeji,


Oops..It was Order detail Table.rather than order table

Regards
Nagaraj.A
- Original Message -
From: Kola Oyedeji [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Monday, April 01, 2002 6:08 AM
Subject: OT: database design question re:product price changes


 Hi

 I have a table which holds orders. The productid and the quantity of items
 purchased are held in this table amongst other things such as the order
 date, customer id etc. Orders are calculated by getting the product cost
and
 multiplying it by quantity. Its occured to me that if the price of items
 changes,because the total of an order is always calculated the order total
 for previous orders will change. IS there any better way to store orders
and
 price info or should I also store the current price of each product when
the
 order is made in the order table - wouldn't this lead to data being
 duplicated?

 Thanks in avance

 Kola

 
__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists