Re: CFqueryParam

2004-08-12 Thread Metzy Martinez
Thanks every one for your help.

i tried toBinary function but i get an error.
Parameter 1 of function toBinary which is now temporary path must be a base64-encoded string

also i tried the longvarchar but when i try to open it I get a bunch of junk
2f7661722f746d702f4143465844416f6f61794e 

any thoughts
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: CFqueryParam

2004-08-12 Thread Metzy Martinez
You have to save the file being uploaded to a location first and then
read the file using CFFILE before you can store it -- you can't just
pass the form variable because... as strange as this may sound... CF
treats different files differently during the upload process, so you
can't rely on any single behavior during that process. Once the file
is saved to a location on the drive, then you can safely read the file
and do whatever you need with it.
==
Well here is the challenge, i think the people here are making things so difficult, i can't save the file to a temporary directory because of security issues. I asked this morning about giving me a temp directory and they did not allow it. I guess at this point it seems impossible.

Did you try reading the file with cffile action="" and
dropping the cfqueryparam tag?
===
i drop the cfqueryparm during insertion i used toBase64 and toBinary but it didn't work. i used cfcontent to display the file.

:( :( :(
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: CFqueryParam

2004-08-12 Thread Metzy Martinez
Unfortunately I don't think you're going to be able to make that work
without being able to save the file somewhere. ... How are you even
uploading it? I thought the CFFILE tag required you to specify a
location to store the file on disk? ...

Hmmm well i was just storing the variable in the table. Am I missing a step. I guess the CFFILE part huh, they definitely don't want a temporary directory.
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




CFqueryParam

2004-08-11 Thread Metzy Martinez
Hello Everyone,

My problem is I'm trying to use cfqueryparam to pass a file to our sybase DB, by using the data type of blob. My column type is image though, Is that Ok? I get an error when i do this, i'm running colfusion 5.0 and it seems to not support the blob data type.

Has anyone accomplished this in CF 5.0 using other methods?

Thank you in advance.
Metzy
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




pathname, HELP :(

2004-08-09 Thread Metzy Martinez
Hello everyone,

I'm trying to create a tree structure, i'm using coldfusion 5 on a unix box. I'm forbidden to use CFTREE and parent child relationships. all i have is a pathname column that i have to parse out to create a hierarchical visual representation of a directory structure. I'm having a really difficult time trying to figure out how i'm going to accomplish this.
Also in this table there is no concept of folder, meaning a folder exist only if a document exist :(

the records can look like this 
doc_idpath_namefile_name
1 test1/test1.1 file1.pdf
2 test1/test1.2 file2.pdf
3 test2/file3.pdf
4 test2/test2.1 file4.pdf
5 test2/test2.1/test2.1.1/file5.pdf

ps. i've found several wonderful examples on alternatives to cftree. but nothing so far that parses a pathname. 

Thank you,
Metzy
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: pathname, HELP :(

2004-08-09 Thread Metzy Martinez
Thank you Isaac for your advice. I had a parent/child relationship for a solution to this application, our dba does not want any recursive functions running on the database. And now i'm trying to switch gears. 

I feel you on the falling asleep part, it's time to go home. :)

Thanks again, I will look into these two options
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: pathname, HELP :(

2004-08-09 Thread Metzy Martinez
Hello,

I don't know if i'm following this correctly.
Your first solution:
cfset rstree = querynew(file,parent)
cfset queryaddrow(rstree)
cfset rstree.file[1] = myfilname
cfset rstree.parent[1] = getdirectoryfrompath(myfilename)

-=--
cfset rstree.parent[1] = getdirectoryfrompath(myfilename)
the getdirectoryfrompath function returns the path that the file is currently stored, but i don't see in your sample pseudo code where you are passing the pathname column field.

Have I lost it?
-=--
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Parsing Path

2004-08-05 Thread Metzy Martinez
Good Afternoon everyone,

I have a table that contains a list of files and folders. 
Rows may look something like this 

doc_id path_namefile_name
5test1/test1.1 test.pdf
4test1/test1.2 test.pdf
3test1folder(place holder if  then it's a folder)
2test/test1.1folder(place holder if  then it's a folder)
1test/test1.2folder(place holder if  then it's a folder)

my goal is to parse through the file path and create a tree hierarchical structure, sortof like windows explorer, using DHTML, I have been banned to use CFTREE.

Has anyone attempted to this?

Thank you,
Metzy
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




zip, unzip

2004-08-02 Thread Metzy Martinez
Hello forum,

I have a directory structure and files stored in a database. A user can add delete and zip files/folders. When they click on the zip button I will need to construct the directory structure and the file, so that when they download the zip it will display the path and file

Does anyone know of a zip function that can be used with ColdFusion 5 on a Unix environment?
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: DHTML recursion problem

2004-07-29 Thread Metzy Martinez
It's extremely fustrating. I'm trying to convert JAVA code into coldFusion and i tried to go with CFTREE but there is a problem with it ColdFusion 5 server. I tried to implement the recursive tree function found in the o'reilly ColdFusion 5 book. that of course is using CFtree.
ughhh.

thanks for your help :)
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




ColdFusion/DHTML recursion tree

2004-07-28 Thread Metzy Martinez
Hello,

I'm trying to create windows explorer style directory structure. And I'm some issues. My folder end up nesting inside of themselves.

Here is my code its a custom tag that calls itself when it finds children

cfoutput

cfif isdefined(attributes.parentItemIdx)
	cfset parentItemId=#attributes.parentItemIdx#

cfelse
	cfset parentItemId = 0
/cfif

cfquery name=get_parents
	SELECT 
		*
	FROM
		participant_assess_actn_doc
	WHERE
		path_name = '#parentItemId#'
	ORDER BY 
		file_name
/cfquery

cfloop query=get_parents
 cfif get_parents.recordcount gt 0
		div id=#get_parents.participant_assess_actn_doc_id# class='FolderOff' >
	cfelse
		div id=#get_parents.participant_assess_actn_doc_id# class='FolderOff' >
	/cfif
	img src='' border='0' id='folder#get_parents.participant_assess_actn_doc_id#'
	span id='texthtml#get_parents.participant_assess_actn_doc_id#' value='#get_parents.participant_assess_actn_doc_id#'#file_name#/span
	/div
	cfquery name=get_children
		SELECT 
			*
		FROM
			participant_assess_actn_doc	
		WHERE
			path_name = '#get_parents.participant_assess_actn_doc_id#'
	/cfquery
	 
	
	

	cfif get_children.recordcount gt 0
	 	span class='branch' id='branch#get_parents.participant_assess_actn_doc_id#'
	/cfif
	cfif #get_parents.participant_assess_actn_doc_id#EQ #parentItemId#
		
		cfmodule template=JMenuBuilder.cfmqass_data_source=d018_reacs_qass parentItemIdx= #get_parents.participant_assess_actn_doc_id#
	/CFIF
/CFLOOP
/cfoutput

Thanks in advance for any help :)
Metzy
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




DHTML recursion problem

2004-07-28 Thread Metzy Martinez
Hello,

I'm trying to create windows explorer style directory structure. And I'm some issues. My folder end up nesting inside of themselves.

Here is my code its a custom tag that calls itself when it finds children

cfoutput

cfif isdefined(attributes.parentItemIdx)
	cfset parentItemId=#attributes.parentItemIdx#

cfelse
	cfset parentItemId = 0
/cfif

cfquery name=get_parents
	SELECT 
		*
	FROM
		participant_assess_actn_doc
	WHERE
		path_name = '#parentItemId#'
	ORDER BY 
		file_name
/cfquery

cfloop query=get_parents
 cfif get_parents.recordcount gt 0
		div id=#get_parents.participant_assess_actn_doc_id# class='FolderOff' >
	cfelse
		div id=#get_parents.participant_assess_actn_doc_id# class='FolderOff' >
	/cfif
	img src='' border='0' id='folder#get_parents.participant_assess_actn_doc_id#'
	span id='texthtml#get_parents.participant_assess_actn_doc_id#' value='#get_parents.participant_assess_actn_doc_id#'#file_name#/span
	/div
	cfquery name=get_children
		SELECT 
			*
		FROM
			participant_assess_actn_doc	
		WHERE
			path_name = '#get_parents.participant_assess_actn_doc_id#'
	/cfquery
	 
	
	

	cfif get_children.recordcount gt 0
	 	span class='branch' id='branch#get_parents.participant_assess_actn_doc_id#'
	/cfif
	cfif #get_parents.participant_assess_actn_doc_id#EQ #parentItemId#
		
		cfmodule template=JMenuBuilder.cfmqass_data_source=d018_reacs_qass parentItemIdx= #get_parents.participant_assess_actn_doc_id#
	/CFIF
/CFLOOP
/cfoutput

Thanks in advance for any help :)
Metzy
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




dynamic select boxes with dynamic names

2002-03-27 Thread Metzy Martinez

Hi everyone i've come accross a problem

I'm creating dynamic select boxes. i can have none to infinity and so i need
for them to have dynamic names. Because i'm not allowed to have select boxes
with the same name.

but when i post my results i'm having a problem resolving the the name of
the select box.

i thought i had fixed it by sending the recordcount number and looping
through the name. but by doing this it only gives me the name of the select
box not the value.

Does any one know the answer please.

Thank you,

Metzy


Here is some code below


!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN

html
head
titleListing Fact/title
/head

body
cfif call is save
cfquery name=factOutput datasource=#dsn.listings_v2# dbtype=ODBC
SELECT
distinct factType
FROM
fact
WHERE
Type_id = #Type_id#
/cfquery
cfquery name=listingFact datasource=#dsn.listings_v2# dbtype=ODBC
DELETE
FROM
listingFact
WHERE
listing_id = #txtListing_id#
/cfquery

!--- #factRecord#
CFOUTPUT
/cfoutput #CUISINE#---
cfoutput query=factoutput

CFLOOP INDEX=thislistingFact LIST=#factOutput.facttype#
#txtListing_id#BR
#thislistingFact#BRBR
CFSTOREDPROC DATASOURCE=#dsn.listings_v2#
PROCEDURE=usplistingFact_Insert
CFPROCRESULT NAME=getlistingFact RESULTSET=1
CFPROCPARAM CFSQLTYPE=CF_SQL_VARCHAR  TYPE=IN
VALUE=#txtListing_id#
CFPROCPARAM CFSQLTYPE=CF_SQL_VARCHAR  TYPE=IN
VALUE=#thislistingFact#
/cfstoredproc
/cfloop
/cfoutput

!---   cfoutput
cflocation 
url=listingForm.cfm?call=edittxtlisting_id=#txtlisting_id#
/cfoutput ---

cfelseif call is add

cfform name=frmlistingFact method=post action=listingFact.cfm
cfoutput
input type=Hidden name=txtListing_Id value=#txtListing_id#
input type=hidden name=type_id value=#type_id#
/cfoutput
input type=hidden name=call value=save
  table border=0 cellspacing=0 cellpadding=0
tr
  tdbPlease Select A Fact/b/td

/tr
tr
  td valign=topFact/td
/tr
tr
  td

  cfquery name=factOutput datasource=#dsn.listings_v2# dbtype=ODBC
SELECT
distinct factType
FROM
fact
WHERE
Type_id = #Type_id#
/cfquery


cfoutput
input type=hidden name=factRecord 
value=#factOutput.recordcount#
table
tr
cfloop index=i from=1 to=#factOutput.recordcount#

cfquery name=qrfactType datasource=#dsn.listings_v2# 
dbtype=ODBC
SELECT
*
FROM
fact
WHERE
factType = '#factOutput.factType[i]#'
/cfquery

td valign=topb#factOutput.factType[i]#/b/td
td
cfselect name=#factOutput.factType[i]# size=5 
multiple=Yes
required=Yes message=Please Select a Fact
cfloop query=qrfactType
option value=#fact_id##fact#/option
/cfloop
/cfselect
/td
/cfloop
/tr
/table
/cfoutput
br
  /td
/tr
tr
td
input type=submit name=btnSubmit value= Submit 
/td
/tr
/table
/cfform
cfelseif call is delete



/cfif
/body
/html

__
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: dynamic select boxes with dynamic names

2002-03-27 Thread Metzy Martinez

Sam that was perfect Thank you so much

-Original Message-
From: Sam Roach [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 12:36 PM
To: CF-Talk
Subject: RE: dynamic select boxes with dynamic names


Try the Evaluate command:

cfloop INDEX=loopcount FROM=1 TO=#FORM.NUMOFQUESTIONS# STEP=1
#Evaluate(Answer#loopcount#)#
/cfloop

-- Sam

-Original Message-
From: Metzy Martinez [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 9:22 AM
To: CF-Talk
Subject: dynamic select boxes with dynamic names


Hi everyone i've come accross a problem

I'm creating dynamic select boxes. i can have none to infinity and so i need
for them to have dynamic names. Because i'm not allowed to have select boxes
with the same name.

but when i post my results i'm having a problem resolving the the name of
the select box.

i thought i had fixed it by sending the recordcount number and looping
through the name. but by doing this it only gives me the name of the select
box not the value.

Does any one know the answer please.

Thank you,

Metzy


Here is some code below


!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN

html
head
titleListing Fact/title
/head

body
cfif call is save
cfquery name=factOutput datasource=#dsn.listings_v2#
dbtype=ODBC
SELECT
distinct factType
FROM
fact
WHERE
Type_id = #Type_id#
/cfquery
cfquery name=listingFact datasource=#dsn.listings_v2# dbtype=ODBC
DELETE
FROM
listingFact
WHERE
listing_id = #txtListing_id#
/cfquery

!--- #factRecord#
CFOUTPUT
/cfoutput #CUISINE#---
cfoutput query=factoutput

CFLOOP INDEX=thislistingFact LIST=#factOutput.facttype#
#txtListing_id#BR
#thislistingFact#BRBR
CFSTOREDPROC DATASOURCE=#dsn.listings_v2#
PROCEDURE=usplistingFact_Insert
CFPROCRESULT NAME=getlistingFact
RESULTSET=1
CFPROCPARAM CFSQLTYPE=CF_SQL_VARCHAR
TYPE=IN
VALUE=#txtListing_id#
CFPROCPARAM CFSQLTYPE=CF_SQL_VARCHAR
TYPE=IN
VALUE=#thislistingFact#
/cfstoredproc
/cfloop
/cfoutput

!---   cfoutput
cflocation
url=listingForm.cfm?call=edittxtlisting_id=#txtlisting_id#
/cfoutput ---

cfelseif call is add

cfform name=frmlistingFact method=post action=listingFact.cfm
cfoutput
input type=Hidden name=txtListing_Id value=#txtListing_id#
input type=hidden name=type_id value=#type_id#
/cfoutput
input type=hidden name=call value=save
  table border=0 cellspacing=0 cellpadding=0
tr
  tdbPlease Select A Fact/b/td

/tr
tr
  td valign=topFact/td
/tr
tr
  td

  cfquery name=factOutput datasource=#dsn.listings_v2#
dbtype=ODBC
SELECT
distinct factType
FROM
fact
WHERE
Type_id = #Type_id#
/cfquery


cfoutput
input type=hidden name=factRecord
value=#factOutput.recordcount#
table
tr
cfloop index=i from=1 to=#factOutput.recordcount#

cfquery name=qrfactType
datasource=#dsn.listings_v2# dbtype=ODBC
SELECT
*
FROM
fact
WHERE
factType = '#factOutput.factType[i]#'
/cfquery

td
valign=topb#factOutput.factType[i]#/b/td
td
cfselect name=#factOutput.factType[i]# size=5
multiple=Yes
required=Yes message=Please Select a Fact
cfloop query=qrfactType
option
value=#fact_id##fact#/option
/cfloop
/cfselect
/td
/cfloop
/tr
/table
/cfoutput
br
  /td
/tr
tr
td
input type=submit name=btnSubmit value= Submit

/td
/tr
/table
/cfform
cfelseif call is delete



/cfif
/body
/html



__
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



problems with cfoutput

2002-01-23 Thread Metzy Martinez

I'm having problems with cfoutput, it's outputing these tags

html
head
titleUntitled Document/title
meta http-equiv=Content-Type content=text/html; 
charset=iso-8859-1
/head

body bgcolor=#FF text=#00

/body
/html

I'm trying to dynamically create javascript and to call that javascript
from an onload event. It's to find my function because it's looking at
the wrong body tag.

Example Below.

what the #%%$% is going 

is there any other way to output dynamic text?


Thank you
#Code##
html
head
titleUntitled Document/title
meta http-equiv=Content-Type content=text/html; 
charset=iso-8859-1
/head

body bgcolor=#FF text=#00

/body
/html --This is the problem


HTML
HEAD
META NAME=ROBOTS CONTENT=NONE
SCRIPT LANGUAGE=JavaScript
!--
function refreshProduct()
{
// Rebuilds the addess list for the listing page.
// It is built here so that it can be returned to the listing page and
reloaded




var arrValue = new Array(4);
var arrLabel = new Array(4);


arrValue[1] = 2964;
arrLabel[1] = '1531 Robindale road';

arrValue[2] = 2965;
arrLabel[2] = '1531 Robindale road';

arrValue[3] = 2967;
arrLabel[3] = '1531 Robindale road';

arrValue[4] = 2968;
arrLabel[4] = '1531 Robindale road';


window.opener.modifyCatalog(arrLabel, arrValue);


window.close();
}
//--
/SCRIPT
/HEAD
BODY onload=javascript: refreshProduct();

/body
/HTML





-
Metzy Matinez 

__
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
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: javascript/coldfusion--- Can you do this?

2002-01-22 Thread Metzy Martinez

Steve-

thank you for the direction, it looks i can make it work, i think.

but how do a pass the variable through a cflocation. do i just append
like any other variable or does it have to be in a form?

-Original Message-
From: Steve Oliver [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 21, 2002 5:17 PM
To: CF-Talk
Subject: RE: javascript/coldfusion--- Can you do this?


Look into WDDX, CFML2JS will create an array of all of your values for
you. 

Something like
script
cfwddx action=cfml2js input=qryName
toplevelvariable=variablename
/script

That will result in
script 
variablename = new array stuff
/script

You'll need to include wddx.js which is in your cfide/scripts folder.

__
steve oliver
cresco technologies, inc.
http://www.crescotech.com


-Original Message-
From: Metzy Martinez [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 21, 2002 4:55 PM
To: CF-Talk
Subject: javascript/coldfusion--- Can you do this?


i have an application that saves a listing entry. this entry can have
multiple number of addresses. so i have a child window that pops up.
this window then calls addresspost.cfm, this is the code you will find
below, and with this page i save the address and proceed to get all of
the address that belong to the specific listing_id. once i get all of
the addresses i place them into an array. but now i'm trying to pass
that array into javascript and don't know how. 

Please help SomeOne
Thank you
Metzy



cfparam name=txtListing_Id default=
cfparam name=selArea default=
cfparam name=txtStreet1 default=
cfparam name=txtStreet2 default=
cfparam name=txtCity default=
cfparam name=selState default=
cfparam name=txtZip default=
cfparam name=txtPhone default=
cfparam name=txtFax default=
cfparam name=txtEmail default=
cfparam name=txtHours default=
cfparam name=txtDescription default=
cfparam name=txtKeywords default=
cfparam name=chkActive default=off
cfoutput
cfquery name=address datasource=#dsn.listings_v2#
INSERT INTO 
address
(Listing_Id, area_Id, street1, street2, city, state,
zipCode, phone, fax, email, hours, description, keywords, active) 
VALUES 
(#txtListing_Id#, '#selArea#', '#txtStreet1#',
'#txtStreet2#', '#txtCity#', '#selState#', '#txtZip#', '#txtPhone#',
'#txtFax#', '#txtEmail#', '#txtHours#', '#txtDescription#',
'#txtKeywords#',
'#chkActive#')
/cfquery
cfquery name=addressArray datasource=#dsn.listings_v2#
dbtype=ODBC SELECT 
address_ID, street1
FROM 
address 
WHERE
listing_id = #txtListing_id#
/cfquery
/cfoutput
cfif addressArray.recordCount GT 0
cfset arrValue = ArrayNew(1)
cfset arrLabel = ArrayNew(1)
cfloop index=i from=1 to=#addressArray.recordcount# 
cfset arrValue = AddressArray.address_id
cfset arrLabel = 'addressArra.street'
/cfloop

HTML
HEAD
META NAME=ROBOTS CONTENT=NONE
SCRIPT LANGUAGE=JavaScript
!--
function refreshProduct()
{
// Rebuilds the catalog list for the product page.
// It is built here so that it can be returned to the product page and
reloaded window.opener.modifyAddress(#arrLabel#, #arrValue#);

window.close();
}
//--

/SCRIPT

/HEAD
BODY onload=javascript: refreshProduct();
/body
/HTML
cfelse
HTML
HEAD
META NAME=ROBOTS CONTENT=NONE
SCRIPT LANGUAGE=JavaScript
!--
function refreshProduct()
{
// Rebuilds the catalog list for the product page.
// It is built here so that it can be returned to the product page and
reloaded

var arrValue;
var arrLabel;
window.opener.modifyaddress(arrLabel, 0);

window.close();

}
//--

/SCRIPT

/HEAD
BODY onload=javascript: refreshProduct();
/body
/HTML

/cfif 

-
Metzy Matinez 



__
Why Share?
  Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
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: javascript/coldfusion--- Can you do this?

2002-01-22 Thread Metzy Martinez

thanks steve

-Original Message-
From: Steve Oliver [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 22, 2002 12:57 PM
To: CF-Talk
Subject: RE: javascript/coldfusion--- Can you do this?


Here is an example of what you can do with WDDX
http://hotwired.lycos.com/webmonkey/99/15/demo/index.html

The article for that is located here.
http://hotwired.lycos.com/webmonkey/99/15/index3a.html


__
steve oliver
cresco technologies, inc.
http://www.crescotech.com


-Original Message-
From: Metzy Martinez [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 22, 2002 12:44 PM
To: CF-Talk
Subject: RE: javascript/coldfusion--- Can you do this?


Steve-

thank you for the direction, it looks i can make it work, i think.

but how do a pass the variable through a cflocation. do i just append
like any other variable or does it have to be in a form?

-Original Message-
From: Steve Oliver [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 21, 2002 5:17 PM
To: CF-Talk
Subject: RE: javascript/coldfusion--- Can you do this?


Look into WDDX, CFML2JS will create an array of all of your values for
you. 

Something like
script
cfwddx action=cfml2js input=qryName
toplevelvariable=variablename
/script

That will result in
script 
variablename = new array stuff
/script

You'll need to include wddx.js which is in your cfide/scripts folder.

__
steve oliver
cresco technologies, inc.
http://www.crescotech.com


-Original Message-
From: Metzy Martinez [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 21, 2002 4:55 PM
To: CF-Talk
Subject: javascript/coldfusion--- Can you do this?


i have an application that saves a listing entry. this entry can have
multiple number of addresses. so i have a child window that pops up.
this window then calls addresspost.cfm, this is the code you will find
below, and with this page i save the address and proceed to get all of
the address that belong to the specific listing_id. once i get all of
the addresses i place them into an array. but now i'm trying to pass
that array into javascript and don't know how. 

Please help SomeOne
Thank you
Metzy



cfparam name=txtListing_Id default=
cfparam name=selArea default=
cfparam name=txtStreet1 default=
cfparam name=txtStreet2 default=
cfparam name=txtCity default=
cfparam name=selState default=
cfparam name=txtZip default=
cfparam name=txtPhone default=
cfparam name=txtFax default=
cfparam name=txtEmail default=
cfparam name=txtHours default=
cfparam name=txtDescription default=
cfparam name=txtKeywords default=
cfparam name=chkActive default=off
cfoutput
cfquery name=address datasource=#dsn.listings_v2#
INSERT INTO 
address
(Listing_Id, area_Id, street1, street2, city, state,
zipCode, phone, fax, email, hours, description, keywords, active) 
VALUES 
(#txtListing_Id#, '#selArea#', '#txtStreet1#',
'#txtStreet2#', '#txtCity#', '#selState#', '#txtZip#', '#txtPhone#',
'#txtFax#', '#txtEmail#', '#txtHours#', '#txtDescription#',
'#txtKeywords#',
'#chkActive#')
/cfquery
cfquery name=addressArray datasource=#dsn.listings_v2#
dbtype=ODBC SELECT 
address_ID, street1
FROM 
address 
WHERE
listing_id = #txtListing_id#
/cfquery
/cfoutput
cfif addressArray.recordCount GT 0
cfset arrValue = ArrayNew(1)
cfset arrLabel = ArrayNew(1)
cfloop index=i from=1 to=#addressArray.recordcount# 
cfset arrValue = AddressArray.address_id
cfset arrLabel = 'addressArra.street'
/cfloop

HTML
HEAD
META NAME=ROBOTS CONTENT=NONE
SCRIPT LANGUAGE=JavaScript
!--
function refreshProduct()
{
// Rebuilds the catalog list for the product page.
// It is built here so that it can be returned to the product page and
reloaded window.opener.modifyAddress(#arrLabel#, #arrValue#);

window.close();
}
//--

/SCRIPT

/HEAD
BODY onload=javascript: refreshProduct();
/body
/HTML
cfelse
HTML
HEAD
META NAME=ROBOTS CONTENT=NONE
SCRIPT LANGUAGE=JavaScript
!--
function refreshProduct()
{
// Rebuilds the catalog list for the product page.
// It is built here so that it can be returned to the product page and
reloaded

var arrValue;
var arrLabel;
window.opener.modifyaddress(arrLabel, 0);

window.close();

}
//--

/SCRIPT

/HEAD
BODY onload=javascript: refreshProduct();
/body
/HTML

/cfif 

-
Metzy Matinez 





__
Why Share?
  Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
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: javascript/coldfusion--- Can you do this?

2002-01-22 Thread Metzy Martinez
 and
reloaded
cfoutput
cfwddx action=WDDX2CFML input=#address# 
output=addressArray
/cfoutput
cfoutput query=addressArray
 
cfif #addressArray.recordcount# GT 0
 
   var arrValue = new Array(#addressArray.recordcount#);
   var arrLabel = new Array(#addressArray.recordcount#);
  
  cfloop index=i from=1 to=#addressArray.recordcount# 
   arrValue[#i#] = #address_id[i]#;
   arrLabel[#i#] = '#street1[i]#';
  /cfloop
 
 window.opener.modifyCatalog(arrLabel, arrValue);
cfElse
 var arrValue;
 var arrLabel;
 window.opener.modifyCatalog(arrLabel, 0);
/cfIf
/cfoutput
 window.close();
}
//--
/SCRIPT
/HEAD
BODY onload=javascript: refreshProduct();
 
/body
/HTML
 
 
 
 

**



-Original Message-
From: Steve Oliver [ mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 22, 2002 12:57 PM
To: CF-Talk
Subject: RE: javascript/coldfusion--- Can you do this?


Here is an example of what you can do with WDDX
http://hotwired.lycos.com/webmonkey/99/15/demo/index.html

The article for that is located here.
http://hotwired.lycos.com/webmonkey/99/15/index3a.html


__
steve oliver
cresco technologies, inc.
http://www.crescotech.com


-Original Message-
From: Metzy Martinez [ mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 22, 2002 12:44 PM
To: CF-Talk
Subject: RE: javascript/coldfusion--- Can you do this?


Steve-

thank you for the direction, it looks i can make it work, i think.

but how do a pass the variable through a cflocation. do i just append
like any other variable or does it have to be in a form?

-Original Message-
From: Steve Oliver [ mailto:[EMAIL PROTECTED]]
Sent: Monday, January 21, 2002 5:17 PM
To: CF-Talk
Subject: RE: javascript/coldfusion--- Can you do this?


Look into WDDX, CFML2JS will create an array of all of your values for
you.

Something like
script
cfwddx action=cfml2js input=qryName
toplevelvariable=variablename
/script

That will result in
script
variablename = new array stuff
/script

You'll need to include wddx.js which is in your cfide/scripts folder.

__
steve oliver
cresco technologies, inc.
http://www.crescotech.com


-Original Message-
From: Metzy Martinez [ mailto:[EMAIL PROTECTED]]
Sent: Monday, January 21, 2002 4:55 PM
To: CF-Talk
Subject: javascript/coldfusion--- Can you do this?


i have an application that saves a listing entry. this entry can have
multiple number of addresses. so i have a child window that pops up.
this window then calls addresspost.cfm, this is the code you will find
below, and with this page i save the address and proceed to get all of
the address that belong to the specific listing_id. once i get all of
the addresses i place them into an array. but now i'm trying to pass
that array into javascript and don't know how.

Please help SomeOne
Thank you
Metzy



cfparam name=txtListing_Id default=
cfparam name=selArea default=
cfparam name=txtStreet1 default=
cfparam name=txtStreet2 default=
cfparam name=txtCity default=
cfparam name=selState default=
cfparam name=txtZip default=
cfparam name=txtPhone default=
cfparam name=txtFax default=
cfparam name=txtEmail default=
cfparam name=txtHours default=
cfparam name=txtDescription default=
cfparam name=txtKeywords default=
cfparam name=chkActive default=off
cfoutput
cfquery name=address datasource=#dsn.listings_v2#
INSERT INTO
address
(Listing_Id, area_Id, street1, street2, city, state,
zipCode, phone, fax, email, hours, description, keywords, active)
VALUES
(#txtListing_Id#, '#selArea#', '#txtStreet1#',
'#txtStreet2#', '#txtCity#', '#selState#', '#txtZip#', '#txtPhone#',
'#txtFax#', '#txtEmail#', '#txtHours#', '#txtDescription#',
'#txtKeywords#',
'#chkActive#')
/cfquery
cfquery name=addressArray datasource=#dsn.listings_v2#
dbtype=ODBC SELECT
address_ID, street1
FROM
address
WHERE
listing_id = #txtListing_id#
/cfquery
/cfoutput
cfif addressArray.recordCount GT 0
cfset arrValue = ArrayNew(1)
cfset arrLabel = ArrayNew(1)
cfloop index=i from=1 to=#addressArray.recordcount#
cfset arrValue = AddressArray.address_id
cfset arrLabel = 'addressArra.street'
/cfloop

HTML
HEAD
META NAME=ROBOTS CONTENT=NONE
SCRIPT LANGUAGE=JavaScript
!--
function refreshProduct()
{
// Rebuilds the catalog list for the product page.
// It is built here so that it can be returned to the product page and
reloaded window.opener.modifyAddress(#arrLabel#, #arrValue#);

window.close();
}
//--

/SCRIPT

/HEAD
BODY onload=javascript: refreshProduct();
/body
/HTML
cfelse
HTML
HEAD
META NAME=ROBOTS CONTENT=NONE
SCRIPT LANGUAGE=JavaScript
!--
function refreshProduct()
{
// Rebuilds the catalog list for the product page.
// It is built here so that it can be returned to the product page and
reloaded

var arrValue;
var arrLabel;
window.opener.modifyaddress(arrLabel, 0);

window.close();

}
//--

/SCRIPT

/HEAD
BODY onload=javascript: refreshProduct();
/body
/HTML

/cfif

javascript/coldfusion--- Can you do this?

2002-01-21 Thread Metzy Martinez

i have an application that saves a listing entry. this entry can have
multiple number of addresses. so i have a child window that pops up.
this window then calls addresspost.cfm, this is the code you will find
below, and with this page i save the address and proceed to get all of
the address that belong to the specific listing_id. once i get all of
the addresses i place them into an array. but now i'm trying to pass
that array into javascript and don't know how. 

Please help SomeOne
Thank you
Metzy



cfparam name=txtListing_Id default=
cfparam name=selArea default=
cfparam name=txtStreet1 default=
cfparam name=txtStreet2 default=
cfparam name=txtCity default=
cfparam name=selState default=
cfparam name=txtZip default=
cfparam name=txtPhone default=
cfparam name=txtFax default=
cfparam name=txtEmail default=
cfparam name=txtHours default=
cfparam name=txtDescription default=
cfparam name=txtKeywords default=
cfparam name=chkActive default=off
cfoutput
cfquery name=address datasource=#dsn.listings_v2#
INSERT INTO 
address
(Listing_Id, area_Id, street1, street2, city, state,
zipCode, phone, fax, email, hours, description, keywords, active) 
VALUES 
(#txtListing_Id#, '#selArea#', '#txtStreet1#',
'#txtStreet2#', '#txtCity#', '#selState#', '#txtZip#', '#txtPhone#',
'#txtFax#', '#txtEmail#', '#txtHours#', '#txtDescription#',
'#txtKeywords#',
'#chkActive#')
/cfquery
cfquery name=addressArray datasource=#dsn.listings_v2#
dbtype=ODBC
SELECT 
address_ID, street1
FROM 
address 
WHERE
listing_id = #txtListing_id#
/cfquery
/cfoutput
cfif addressArray.recordCount GT 0
cfset arrValue = ArrayNew(1)
cfset arrLabel = ArrayNew(1)
cfloop index=i from=1 to=#addressArray.recordcount# 
cfset arrValue = AddressArray.address_id
cfset arrLabel = 'addressArra.street'
/cfloop

HTML
HEAD
META NAME=ROBOTS CONTENT=NONE
SCRIPT LANGUAGE=JavaScript
!--
function refreshProduct()
{
// Rebuilds the catalog list for the product page.
// It is built here so that it can be returned to the product page and
reloaded
window.opener.modifyAddress(#arrLabel#, #arrValue#);

window.close();
}
//--

/SCRIPT

/HEAD
BODY onload=javascript: refreshProduct();
/body
/HTML
cfelse
HTML
HEAD
META NAME=ROBOTS CONTENT=NONE
SCRIPT LANGUAGE=JavaScript
!--
function refreshProduct()
{
// Rebuilds the catalog list for the product page.
// It is built here so that it can be returned to the product page and
reloaded

var arrValue;
var arrLabel;
window.opener.modifyaddress(arrLabel, 0);

window.close();

}
//--

/SCRIPT

/HEAD
BODY onload=javascript: refreshProduct();
/body
/HTML

/cfif 

-
Metzy Matinez 

__
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
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



dynamic checkbox

2001-07-25 Thread Metzy Martinez



Hello everyone

i know how to create a dynamic checkbox but i would like to place them in
about 3 columns.
does any one know how to do this?

thank you,
metzy


~~
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: dynamic checkbox

2001-07-25 Thread Metzy Martinez


I'm sorry where would my query go. I'm getting the names from a table called
interest.




-Original Message-
From: Pooh Bear [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 25, 2001 2:12 PM
To: CF-Talk
Subject: Re: dynamic checkbox


just loop em in a table.  here is a simple example


CFOUTPUT
FORM action=blah.cfm method=post
TABLE
TR
CFLOOP index=looper from=1 to=3
TD
input type=checkbox name=checkbox#looper#
/TD
/CFLOOP
/TR
/TABLE
/CFOUTPUT
/FORM

that should come out in 3 columns :)

From: Metzy Martinez [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Subject: dynamic checkbox
Date: Wed, 25 Jul 2001 16:02:33 -0700



Hello everyone

i know how to create a dynamic checkbox but i would like to place them in
about 3 columns.
does any one know how to do this?

thank you,
metzy



~~
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



insert problem

2001-05-10 Thread Metzy Martinez

i'm trying to same a number that has been formatted as dollar amount

if i have an amount that is $1,110.00  it's telling that i have an error
i'm pretty sure that it is because i'm trying to save and the number is
being placed with a comma in it.  how can i work around this.


Error Diagnostic Information
ODBC Error Code = 37000 (Syntax error or access violation)


[Microsoft][ODBC SQL Server Driver][SQL Server]Line 9: Incorrect syntax near
'110.00'.



The error occurred while processing an element with a general identifier of
(CFQUERY), occupying document position (367:2) to (367:63).


Date/Time: 05/10/01 10:08:17



~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: insert problem

2001-05-10 Thread Metzy Martinez

I tried doing a replace but i still get the same output
I'm doing this before i save.

my field type is money.
there are no quotes on my field


cfquery name=prodEdit datasource=#dsn.bps# dbtype=ODBC
Update product
Set sectionID = #sectionID#,
productName = '#productName#',
description = '#description#',
manufacturer = '#manufacturer#',
manufURL = '#manufURL#',
cfif changeLarge is Yes
imageName = '#imageName#',
/cfif
cfif changeThumb is Yes
thumbName = '#thumbName#',
/cfif
cfif changePrint is Yes
printName = '#printName#',
/cfif
price = #price#,
salePrice = #salePrice#
Where productID = #productID#
/cfquery


#Replace(price, ,, , ALL)#
#price#

#Replace(salePrice, ,, , ALL)#
#salePrice#


price $45.50 salePrice $111,110.00









Error Occurred While Processing Request
Error Diagnostic Information
ODBC Error Code = 37000 (Syntax error or access violation)


[Microsoft][ODBC SQL Server Driver][SQL Server]Line 9: Incorrect syntax near
'110.00'.



The error occurred while processing an element with a general identifier of
(CFQUERY), occupying document position (377:2) to (377:63).


Date/Time: 05/10/01 11:20:05


..

-Original Message-
From: Dylan Bromby [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 10, 2001 7:29 AM
To: CF-Talk
Subject: RE: insert problem


Replace(1,110.00, ,, , ALL)

or Replace(thevar, ,, , ALL) if it's in a variable.

-Original Message-
From: Metzy Martinez [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 10, 2001 10:23 AM
To: CF-Talk
Subject: insert problem


i'm trying to same a number that has been formatted as dollar amount

if i have an amount that is $1,110.00  it's telling that i have an error
i'm pretty sure that it is because i'm trying to save and the number is
being placed with a comma in it.  how can i work around this.


Error Diagnostic Information
ODBC Error Code = 37000 (Syntax error or access violation)


[Microsoft][ODBC SQL Server Driver][SQL Server]Line 9: Incorrect syntax near
'110.00'.



The error occurred while processing an element with a general identifier of
(CFQUERY), occupying document position (367:2) to (367:63).


Date/Time: 05/10/01 10:08:17
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: insert problem

2001-05-10 Thread Metzy Martinez

Thank you guys for all your help

i'm thinking it didn't like the comma because it thought it was a function
of sql

i'm such a dork i put quotes on the price, it work with out the quotes, he
he.
but even after that it still didn't change my variable, so i thought about
cfset variable = replace(variable)

i didn't have to replace the $ sign. after the change of the comma it added
my variable.

Andy-- i decided to change my money data type to a float, thanks for the
input.

I'm a recent graduate and i'm a 1 man development team (my coworker quit and
their not hiring anyone else) and you are the only folks i can bounce ideas
with.  Thank you.

Susan if your out there i miss You

Metzy

-Original Message-
From: Dave f [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 10, 2001 9:51 AM
To: CF-Talk
Subject: Re: insert problem


No quotes around salePrice:
#Replace(salePrice, ,, , ALL)#

(But why isn't numberFormat working for you )

- Original Message -
From: Metzy Martinez [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Thursday, May 10, 2001 2:32 PM
Subject: RE: insert problem


 I tried doing a replace but i still get the same output
 I'm doing this before i save.

 my field type is money.
 there are no quotes on my field


 cfquery name=prodEdit datasource=#dsn.bps# dbtype=ODBC
 Update product
 Set sectionID = #sectionID#,
 productName = '#productName#',
 description = '#description#',
 manufacturer = '#manufacturer#',
 manufURL = '#manufURL#',
 cfif changeLarge is Yes
 imageName = '#imageName#',
 /cfif
 cfif changeThumb is Yes
 thumbName = '#thumbName#',
 /cfif
 cfif changePrint is Yes
 printName = '#printName#',
 /cfif
 price = #price#,
 salePrice = #salePrice#
 Where productID = #productID#
 /cfquery


 #Replace(price, ,, , ALL)#
 #price#

 #Replace(salePrice, ,, , ALL)#
 #salePrice#


 price $45.50 salePrice $111,110.00






 --
--
 

 Error Occurred While Processing Request
 Error Diagnostic Information
 ODBC Error Code = 37000 (Syntax error or access violation)


 [Microsoft][ODBC SQL Server Driver][SQL Server]Line 9: Incorrect syntax
near
 '110.00'.



 The error occurred while processing an element with a general identifier
of
 (CFQUERY), occupying document position (377:2) to (377:63).


 Date/Time: 05/10/01 11:20:05


 ..

 -Original Message-
 From: Dylan Bromby [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 10, 2001 7:29 AM
 To: CF-Talk
 Subject: RE: insert problem


 Replace(1,110.00, ,, , ALL)

 or Replace(thevar, ,, , ALL) if it's in a variable.

 -Original Message-
 From: Metzy Martinez [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 10, 2001 10:23 AM
 To: CF-Talk
 Subject: insert problem


 i'm trying to same a number that has been formatted as dollar amount

 if i have an amount that is $1,110.00  it's telling that i have an error
 i'm pretty sure that it is because i'm trying to save and the number is
 being placed with a comma in it.  how can i work around this.


 Error Diagnostic Information
 ODBC Error Code = 37000 (Syntax error or access violation)


 [Microsoft][ODBC SQL Server Driver][SQL Server]Line 9: Incorrect syntax
near
 '110.00'.



 The error occurred while processing an element with a general identifier
of
 (CFQUERY), occupying document position (367:2) to (367:63).


 Date/Time: 05/10/01 10:08:17

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



HELP

2001-04-24 Thread Metzy Martinez

Hello-

I have a problem.  I have a bridge table and in that table i have
category
  and
category_other columns

category_other is a comma delimited list of all other types of categories it
can

my question is how can i search this list if i'm searching for one specific
category for example clubs and i want to know if it is also located in the
category_others

**can i use the word contains




cfquery name=lists datasource=#dsn.LocalGuide# dbtype=ODBC
Select x.*
From #table# x, local_bridge l
Where (((l.Category_Others CONTAINS '#category#') or (l.category =
#category#)) and (x.id = l.co_id))

cfif name is not AND
((x.Name LIKE '%#name#%'))/cfif
cfif category is not AND
((x.CategoryMain = '#category#') OR
(x.CategoryOther = '#category#'))/cfif
cfif street is not  AND
(x.Street1 LIKE '%#street#%')/cfif
cfif keyword is not AND
((x.Keywords LIKE '%#keyword#%') OR
(x.Name LIKE '%#keyword#%') OR
(x.Description LIKE '%#keyword#%'))/cfif
cfif area is not AND (x.AreaOfTown = '#area#') /cfif
cfif yourReview is onAND (x.NumberOfVotes  0)/cfif
cfif criticReview is onAND (x.reviewid  '') /cfif
cfif award is onAND (x.AwardsID  '')/cfif
 ORDER BY #OrderBy#
/cfquery


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: SQL INSERTS - return ID

2001-04-24 Thread Metzy Martinez

I had the same problem a few days ago and that is the way i solved with
SELECT @@IDENTITY

then you are able to retrieve the id and even feed it to another stored proc
by specifying the name of stored proc
ex.
#getreal.id#

what does SET NOCOUNT OFF due?

Metzy



-Original Message-
From: mjohnson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 24, 2001 10:23 AM
To: CF-Talk
Subject: RE: SQL INSERTS - return ID


Using SQL Server you can either do it with a stored procedure or do
something like this.

CFQUERY ...
SET NOCOUNT ON

INSERT INTO somtable
(columns)
VALUES
(values)

SELECT @@IDENTITY  -- grab the id of the last inserted record into an
identity column

SET NOCOUNT OFF
/CFQUERY

Mark

-Original Message-
From: Matt Eschenbaum [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 4:36 PM
To: CF-Talk
Subject: SQL INSERTS - return ID


Anyone know a trick to return the ID of a record just Inserted into a table?

Sincerely,

Matthew M. Eschenbaum
Allaire Certified Professional
DevTech Inc.
[EMAIL PROTECTED]
206.956.0888
www.dev-tech.com
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Showing the results of an add or edit operation

2001-04-17 Thread Metzy Martinez

it seems to me that you need to output the variables that you passed to that
page.

-Original Message-
From: Bonnie Betts [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 16, 2001 9:14 PM
To: CF-Talk
Subject: Re: Showing the results of an add or edit operation


Try this on your submit button:

INPUT TYPE="BUTTON" VALUE="Close Window"
onClick="window.opener.location.reload(); self.close();"

I used this for a popup page that added a new user, so just take out the
self.close() if you aren't using a popup.

Bonnie E. Betts
[EMAIL PROTECTED]
www.interacttechs.com


- Original Message -
From: "Hubert Earl" [EMAIL PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Monday, April 16, 2001 10:42 AM
Subject: Showing the results of an add or edit operation


 Hi,

 I've built four files. The first shows the contents of a table.  The
second is a form which the user to add to, edit or delete from the table,
after which the user is automatically returned to the file showing the table
contents.  The third is the action file for the add to and edit operation
and the fouth the action file for the delete operation.

 The problem is that when the user is automatically returned to the page
showing the table contents,  it doesn't show the results of the change for
the add to or the edit operations.  The user has to hit the refresh button
to see the changes made (for the delete operation, however, the change is
shown).

 What additional code should I use so that the results of the add to and
edit operations are immediately visible, and in which file should the code
be put?

 Sincerely,
 ---
 Hubert Earl

 ICQ#: 16199853
 AIM: hubertfme

 My Jamaican Art, Craft  More Online Store:
http://www.angelfire.com/ny/hearl/link_page_on_angelfire.html





~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Database Normalization?

2001-04-13 Thread Metzy Martinez

my task is to take a massive localguide database and try to normalize


the database currently consist of fields like:


company information
category main
category other
subscategory
subscategory other
list
areaoftown


an example of category main might restaurant
and category other as nightclub
subscatergory might be chinese and subscatgoryother as italian
list might be wedding
and areaoftown could be carytown

so all together it is a restaurant which is also a club that serves chinese
and italian
that caters for weddings and is located in carytown



choices seperate each category main into seperate tables so i would
restaurant, clubs, golf course, etc.









my options are seperating each table out and doing some crazy queries and
inserts.

or making a categories table and a company table  and a table that houses
category id and company id.


or is there a another option that i'm overlooking


the reason for the change is that the database is being pounded around 12
and 5 each day because of queries for restaurants



please help
metzy


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



How do you save to your remote server on 4.5??????!!!!!!!

2001-03-27 Thread Metzy Martinez

i feel like silly but i just got version 4.5 and i can't seem to be able to
save any of my files to the remote server.

please some one advice.


thanks
metzy


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: How do you save to your remote server on 4.5??????!!!!!!!

2001-03-27 Thread Metzy Martinez

weird thing is that my co-workers are able to save to the server.
But they can't remember how they solved the problem !!!

-Original Message-
From: Dave Hannum [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 27, 2001 8:56 AM
To: CF-Talk
Subject: Re: How do you save to your remote server on 4.5??!!!


RDS must be "on" on the remote server, or you must have FTP available. Then,
from your Dropdown Box that displays all of your drives, choose "Allaire FTP
 RDS" and set up either there.

Dave


- Original Message -
From: "Metzy Martinez" [EMAIL PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Tuesday, March 27, 2001 2:46 PM
Subject: How do you save to your remote server on 4.5??!!!


 i feel like silly but i just got version 4.5 and i can't seem to be able
to
 save any of my files to the remote server.

 please some one advice.


 thanks
 metzy



~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



can you use if in a where clause in a stored procedure

2001-03-07 Thread metzy martinez



~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists