RE: mysql EXPLAIN [tablename] in CFQUERY?

2002-08-21 Thread Lon Lentz

  I run this:

cfquery name=TableColumns datasource=#Client.Database#
explain #form.tablename#
/cfquery

cfdump var=#TableColumns#


  And get this:

Error resolving parameter TABLECOLUMNS

ColdFusion was unable to determine the value of the parameter. This problem
is very likely due to the fact that either:

You have misspelled the parameter name, or
You have not specified a QUERY attribute for a CFOUTPUT, CFMAIL, or CFTABLE
tag.

The error occurred while processing an element with a general identifier of
(CFDUMP), occupying document position (381:1) to (381:29) in the template


  Other funny occurence. If I select * from the table in question and loop
through the result I can display the records with no problem. But if I do a
cfdump on that queryset, I get a DNS error.


-Original Message-
From: Ben Forta [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 20, 2002 9:49 PM
To: CF-Talk
Subject: RE: mysql EXPLAIN [tablename] in CFQUERY?


Do a CFDUMP VAR=#explain# after the CFQUERY to see if anything at
all is returned.

--- Ben




__
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: mysql EXPLAIN [tablename] in CFQUERY?

2002-08-21 Thread todd

FYI, MySQL doesn't use 'explain table' it uses 'describe table'

On Wed, 21 Aug 2002, Lon Lentz wrote:

   I run this:
 
 cfquery name=TableColumns datasource=#Client.Database#
   explain #form.tablename#
 /cfquery
 
 cfdump var=#TableColumns#
 
 
   And get this:
 
 Error resolving parameter TABLECOLUMNS
 
 ColdFusion was unable to determine the value of the parameter. This problem
 is very likely due to the fact that either:
 
 You have misspelled the parameter name, or
 You have not specified a QUERY attribute for a CFOUTPUT, CFMAIL, or CFTABLE
 tag.
 
 The error occurred while processing an element with a general identifier of
 (CFDUMP), occupying document position (381:1) to (381:29) in the template
 
 
   Other funny occurence. If I select * from the table in question and loop
 through the result I can display the records with no problem. But if I do a
 cfdump on that queryset, I get a DNS error.
 
 
 -Original Message-
 From: Ben Forta [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, August 20, 2002 9:49 PM
 To: CF-Talk
 Subject: RE: mysql EXPLAIN [tablename] in CFQUERY?
 
 
 Do a CFDUMP VAR=#explain# after the CFQUERY to see if anything at
 all is returned.
 
 --- Ben
 
 
 
 
 
__
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: mysql EXPLAIN [tablename] in CFQUERY? (fwd)

2002-08-21 Thread todd

cfquery name=getTables datasource=cfmx
describe blah
/cfquery

cfdump var=#getTables#


Works for me.  Sorry I didn't catch this email sooner and read it, just 
been busy.

~Todd


-- Forwarded message --
Date: Wed, 21 Aug 2002 12:18:05 -0400 (EDT)
From: [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Subject: RE: mysql EXPLAIN [tablename] in CFQUERY?


FYI, MySQL doesn't use 'explain table' it uses 'describe table'

On Wed, 21 Aug 2002, Lon Lentz wrote:

   I run this:
 
 cfquery name=TableColumns datasource=#Client.Database#
   explain #form.tablename#
 /cfquery
 
 cfdump var=#TableColumns#
 

-- 

Todd Rafferty ([EMAIL PROTECTED]) - http://www.web-rat.com/ |
Team Macromedia Volunteer for ColdFusion   |
http://www.macromedia.com/support/forums/team_macromedia/  |
http://www.flashCFM.com/   - webRat (Moderator)|
http://www.ultrashock.com/ - webRat (Back-end Moderator)   |



__
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: mysql EXPLAIN [tablename] in CFQUERY?

2002-08-21 Thread Lon Lentz

  They both work from the command line. And changing the query to describe
generates
 the same error.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 21, 2002 12:18 PM
To: CF-Talk
Subject: RE: mysql EXPLAIN [tablename] in CFQUERY?


FYI, MySQL doesn't use 'explain table' it uses 'describe table'

On Wed, 21 Aug 2002, Lon Lentz wrote:

   I run this:

 cfquery name=TableColumns datasource=#Client.Database#
   explain #form.tablename#
 /cfquery

 cfdump var=#TableColumns#


   And get this:

 Error resolving parameter TABLECOLUMNS

 ColdFusion was unable to determine the value of the parameter. This
problem
 is very likely due to the fact that either:

 You have misspelled the parameter name, or
 You have not specified a QUERY attribute for a CFOUTPUT, CFMAIL, or
CFTABLE
 tag.

 The error occurred while processing an element with a general identifier
of
 (CFDUMP), occupying document position (381:1) to (381:29) in the template


   Other funny occurence. If I select * from the table in question and loop
 through the result I can display the records with no problem. But if I do
a
 cfdump on that queryset, I get a DNS error.


 -Original Message-
 From: Ben Forta [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, August 20, 2002 9:49 PM
 To: CF-Talk
 Subject: RE: mysql EXPLAIN [tablename] in CFQUERY?


 Do a CFDUMP VAR=#explain# after the CFQUERY to see if anything at
 all is returned.

 --- Ben




__
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: mysql EXPLAIN [tablename] in CFQUERY? (fwd)

2002-08-21 Thread Lon Lentz

  What OS are you running on? I am running on Linux with Apache/CF 5 using
the Merant driver.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 21, 2002 12:25 PM
To: CF-Talk
Subject: RE: mysql EXPLAIN [tablename] in CFQUERY? (fwd)


cfquery name=getTables datasource=cfmx
describe blah
/cfquery

cfdump var=#getTables#


Works for me.  Sorry I didn't catch this email sooner and read it, just
been busy.


__
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: mysql EXPLAIN [tablename] in CFQUERY?

2002-08-21 Thread todd

Here's a question for you, the datasource that's doing this has to be 
using a specific db before you can explain / describe a table.

From a command line, you have to type:

use db;
explain table;

Otherwise, you have to type:

explain db.table;

So, if you're creating a DSN that doesn't point to a particular database, 
you will have to:

cflock timeout=60 throwontimeout=No name=showTblLock 
type=EXCLUSIVE
cfquery name=useDb datasource=#request.dsn#
use #arguments.db#
/cfquery
cfquery name=getTables datasource=#request.dsn#
SHOW TABLE STATUS
/cfquery
/cflock

HTH,
~Todd

On Wed, 21 Aug 2002, Lon Lentz wrote:

   They both work from the command line. And changing the query to describe
 generates
  the same error.
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, August 21, 2002 12:18 PM
 To: CF-Talk
 Subject: RE: mysql EXPLAIN [tablename] in CFQUERY?
 
 
 FYI, MySQL doesn't use 'explain table' it uses 'describe table'
 
 On Wed, 21 Aug 2002, Lon Lentz wrote:
 
I run this:
 
  cfquery name=TableColumns datasource=#Client.Database#
  explain #form.tablename#
  /cfquery
 
  cfdump var=#TableColumns#
 
 
And get this:
 
  Error resolving parameter TABLECOLUMNS
 
  ColdFusion was unable to determine the value of the parameter. This
 problem
  is very likely due to the fact that either:
 
  You have misspelled the parameter name, or
  You have not specified a QUERY attribute for a CFOUTPUT, CFMAIL, or
 CFTABLE
  tag.
 
  The error occurred while processing an element with a general identifier
 of
  (CFDUMP), occupying document position (381:1) to (381:29) in the template
 
 
Other funny occurence. If I select * from the table in question and loop
  through the result I can display the records with no problem. But if I do
 a
  cfdump on that queryset, I get a DNS error.
 
 
  -Original Message-
  From: Ben Forta [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, August 20, 2002 9:49 PM
  To: CF-Talk
  Subject: RE: mysql EXPLAIN [tablename] in CFQUERY?
 
 
  Do a CFDUMP VAR=#explain# after the CFQUERY to see if anything at
  all is returned.
 
  --- Ben
 
 
 
 
 
__
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: mysql EXPLAIN [tablename] in CFQUERY? (fwd)

2002-08-21 Thread todd

I'm using Windows/Apache/MySQL/CFMX and I'm using RH7.2/Apache/MySQL/CFMX.

Maybe it's a merant driver problem if it's not a use db problem.

~Todd

On Wed, 21 Aug 2002, Lon Lentz wrote:

   What OS are you running on? I am running on Linux with Apache/CF 5 using
 the Merant driver.
 
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, August 21, 2002 12:25 PM
 To: CF-Talk
 Subject: RE: mysql EXPLAIN [tablename] in CFQUERY? (fwd)
 
 
 cfquery name=getTables datasource=cfmx
 describe blah
 /cfquery
 
 cfdump var=#getTables#
 
 
 Works for me.  Sorry I didn't catch this email sooner and read it, just
 been busy.
 
 
 
__
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: mysql EXPLAIN [tablename] in CFQUERY? (fwd)

2002-08-21 Thread Lon Lentz

  The use db did not fix it. Are you using a non-Merant driver on your
Linux box?


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 21, 2002 12:36 PM
To: CF-Talk
Subject: RE: mysql EXPLAIN [tablename] in CFQUERY? (fwd)


I'm using Windows/Apache/MySQL/CFMX and I'm using RH7.2/Apache/MySQL/CFMX.

Maybe it's a merant driver problem if it's not a use db problem.


__
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: mysql EXPLAIN [tablename] in CFQUERY? (fwd)

2002-08-21 Thread todd

I'm justing whatever drivers came with CFMX, I'm guessing the mysql j 
drivers or something... or, perhaps it's the jdbc drivers for mysql.

~Todd

On Wed, 21 Aug 2002, Lon Lentz wrote:

   The use db did not fix it. Are you using a non-Merant driver on your
 Linux box?
 
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, August 21, 2002 12:36 PM
 To: CF-Talk
 Subject: RE: mysql EXPLAIN [tablename] in CFQUERY? (fwd)
 
 
 I'm using Windows/Apache/MySQL/CFMX and I'm using RH7.2/Apache/MySQL/CFMX.
 
 Maybe it's a merant driver problem if it's not a use db problem.

-- 

Todd Rafferty ([EMAIL PROTECTED]) - http://www.web-rat.com/ |
Team Macromedia Volunteer for ColdFusion   |
http://www.macromedia.com/support/forums/team_macromedia/  |
http://www.flashCFM.com/   - webRat (Moderator)|
http://www.ultrashock.com/ - webRat (Back-end Moderator)   |


__
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: mysql EXPLAIN [tablename] in CFQUERY?

2002-08-20 Thread Paul Giesenhagen

Does your situtation look something like this? Are you putting the
query=EXPLAIN in the loop?

cfquery datasource=xxx name=EXPLAIN
SQL Stuff
/cfquery

cfloop query=EXPLAIN
#data#br
/cfloop

Paul Giesenhagen
QuillDesign



   I am trying to return the result set of an EXPLAIN tablename command
from
 a mysql database. I can query the table directly with no problems. The
 EXPLAIN returns a result set from the command line properly. But it seems
 that CFQUERY does not return anything. When I try to loop through the
 result, it gives me an error:


 The QUERY attribute of the tag does not specify the name of an available
 query


 __
 Lon Lentz
 Applications Developer
 EXImpact.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: mysql EXPLAIN [tablename] in CFQUERY?

2002-08-20 Thread Lon Lentz

  Here is what I have:

cfquery name=TableColumns datasource=#Client.Database#
explain #form.TableName#
/cfquery

cfloop query=TableColumns
cfoutput#Field# - #Type# - #Null#/cfoutput
/cfloop

-Original Message-
From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 20, 2002 5:28 PM
To: CF-Talk
Subject: Re: mysql EXPLAIN [tablename] in CFQUERY?


Does your situtation look something like this? Are you putting the
query=EXPLAIN in the loop?

cfquery datasource=xxx name=EXPLAIN
SQL Stuff
/cfquery

cfloop query=EXPLAIN
#data#br
/cfloop

Paul Giesenhagen
QuillDesign



   I am trying to return the result set of an EXPLAIN tablename command
from
 a mysql database. I can query the table directly with no problems. The
 EXPLAIN returns a result set from the command line properly. But it seems
 that CFQUERY does not return anything. When I try to loop through the
 result, it gives me an error:


 The QUERY attribute of the tag does not specify the name of an available
 query




__
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: mysql EXPLAIN [tablename] in CFQUERY?

2002-08-20 Thread Paul Giesenhagen

I don't know if explain is supported .. did you try to output a recordcount?
to see if the query is bringing anything in?

How about also trying to output your cfquery statement to see if there are
any errors such as:

cfoutput
cfquery name=TableColumns datasource=#Client.Database#br
explain #form.TableName#br
/cfquerybr
/cfoutput

With the above example, you can make sure that everything is being
dynamically populated.

Paul Giesenhagen
QuillDesign

- Original Message -
From: Lon Lentz [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Tuesday, August 20, 2002 4:40 PM
Subject: RE: mysql EXPLAIN [tablename] in CFQUERY?


   Here is what I have:

 cfquery name=TableColumns datasource=#Client.Database#
 explain #form.TableName#
 /cfquery

 cfloop query=TableColumns
 cfoutput#Field# - #Type# - #Null#/cfoutput
 /cfloop

 -Original Message-
 From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, August 20, 2002 5:28 PM
 To: CF-Talk
 Subject: Re: mysql EXPLAIN [tablename] in CFQUERY?


 Does your situtation look something like this? Are you putting the
 query=EXPLAIN in the loop?

 cfquery datasource=xxx name=EXPLAIN
 SQL Stuff
 /cfquery

 cfloop query=EXPLAIN
 #data#br
 /cfloop

 Paul Giesenhagen
 QuillDesign



I am trying to return the result set of an EXPLAIN tablename command
 from
  a mysql database. I can query the table directly with no problems. The
  EXPLAIN returns a result set from the command line properly. But it
seems
  that CFQUERY does not return anything. When I try to loop through the
  result, it gives me an error:
 
 
  The QUERY attribute of the tag does not specify the name of an available
  query




 
__
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: mysql EXPLAIN [tablename] in CFQUERY?

2002-08-20 Thread Lon Lentz

  The query is built okay. A .recordcount produces the same error. It
appears that explain generates a standard queryset in proper form. So I am
stumped as to why explain may not be supported.


-Original Message-
From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 20, 2002 5:39 PM
To: CF-Talk
Subject: Re: mysql EXPLAIN [tablename] in CFQUERY?


I don't know if explain is supported .. did you try to output a recordcount?
to see if the query is bringing anything in?

How about also trying to output your cfquery statement to see if there are
any errors such as:

cfoutput
cfquery name=TableColumns datasource=#Client.Database#br
explain #form.TableName#br
/cfquerybr
/cfoutput

With the above example, you can make sure that everything is being
dynamically populated.

Paul Giesenhagen
QuillDesign

- Original Message -
From: Lon Lentz [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Tuesday, August 20, 2002 4:40 PM
Subject: RE: mysql EXPLAIN [tablename] in CFQUERY?


   Here is what I have:

 cfquery name=TableColumns datasource=#Client.Database#
 explain #form.TableName#
 /cfquery

 cfloop query=TableColumns
 cfoutput#Field# - #Type# - #Null#/cfoutput
 /cfloop

 -Original Message-
 From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, August 20, 2002 5:28 PM
 To: CF-Talk
 Subject: Re: mysql EXPLAIN [tablename] in CFQUERY?


 Does your situtation look something like this? Are you putting the
 query=EXPLAIN in the loop?

 cfquery datasource=xxx name=EXPLAIN
 SQL Stuff
 /cfquery

 cfloop query=EXPLAIN
 #data#br
 /cfloop

 Paul Giesenhagen
 QuillDesign



I am trying to return the result set of an EXPLAIN tablename command
 from
  a mysql database. I can query the table directly with no problems. The
  EXPLAIN returns a result set from the command line properly. But it
seems
  that CFQUERY does not return anything. When I try to loop through the
  result, it gives me an error:
 
 
  The QUERY attribute of the tag does not specify the name of an available
  query



__
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: mysql EXPLAIN [tablename] in CFQUERY?

2002-08-20 Thread Ben Forta

Do a CFDUMP VAR=#explain# after the CFQUERY to see if anything at
all is returned.

--- Ben


-Original Message-
From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, August 20, 2002 5:39 PM
To: CF-Talk
Subject: Re: mysql EXPLAIN [tablename] in CFQUERY?


I don't know if explain is supported .. did you try to output a
recordcount? to see if the query is bringing anything in?

How about also trying to output your cfquery statement to see if there
are any errors such as:

cfoutput
cfquery name=TableColumns datasource=#Client.Database#br
explain #form.TableName#br
/cfquerybr
/cfoutput

With the above example, you can make sure that everything is being
dynamically populated.

Paul Giesenhagen
QuillDesign

- Original Message -
From: Lon Lentz [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Tuesday, August 20, 2002 4:40 PM
Subject: RE: mysql EXPLAIN [tablename] in CFQUERY?


   Here is what I have:

 cfquery name=TableColumns datasource=#Client.Database# explain 
 #form.TableName# /cfquery

 cfloop query=TableColumns
 cfoutput#Field# - #Type# - #Null#/cfoutput
 /cfloop

 -Original Message-
 From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, August 20, 2002 5:28 PM
 To: CF-Talk
 Subject: Re: mysql EXPLAIN [tablename] in CFQUERY?


 Does your situtation look something like this? Are you putting the 
 query=EXPLAIN in the loop?

 cfquery datasource=xxx name=EXPLAIN
 SQL Stuff
 /cfquery

 cfloop query=EXPLAIN
 #data#br
 /cfloop

 Paul Giesenhagen
 QuillDesign



I am trying to return the result set of an EXPLAIN tablename 
  command
 from
  a mysql database. I can query the table directly with no problems. 
  The EXPLAIN returns a result set from the command line properly. But

  it
seems
  that CFQUERY does not return anything. When I try to loop through 
  the result, it gives me an error:
 
 
  The QUERY attribute of the tag does not specify the name of an 
  available query




 

__
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