Getting Record Count

2013-01-26 Thread Rick Faircloth

If I'm running a query on a database
and limit the records returned to 10,
what's the best way to get the record count
for the entire dataset if everything was
return and not just the first 10 records?

I can re-rerun the query without the 10-record
limit, but that seems like a ridiculous
approach, just to get the record count.

Suggestions!

Thanks,

Rick



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354082
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Getting Record Count

2013-01-26 Thread Brian Thornton

Do a first quesrt using sql count
On Jan 26, 2013 12:41 PM, Rick Faircloth r...@whitestonemedia.com wrote:


 If I'm running a query on a database
 and limit the records returned to 10,
 what's the best way to get the record count
 for the entire dataset if everything was
 return and not just the first 10 records?

 I can re-rerun the query without the 10-record
 limit, but that seems like a ridiculous
 approach, just to get the record count.

 Suggestions!

 Thanks,

 Rick



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354083
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Getting Record Count

2013-01-26 Thread Gerald Guido

Something like this perhaps?

SELECThelp_topic_id , (SELECT count(help_topic_id)   FROM
mysql.help_relation )   as IDCount,help_keyword_id FROM
mysql.help_relation

LIMIT 10;


On Sat, Jan 26, 2013 at 12:41 PM, Rick Faircloth
r...@whitestonemedia.comwrote:


 If I'm running a query on a database
 and limit the records returned to 10,
 what's the best way to get the record count
 for the entire dataset if everything was
 return and not just the first 10 records?

 I can re-rerun the query without the 10-record
 limit, but that seems like a ridiculous
 approach, just to get the record count.

 Suggestions!

 Thanks,

 Rick



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354084
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Getting Record Count

2013-01-26 Thread Rick Faircloth

That worked! Learn something new every day!
Thanks, Gerald and Brian for the tips!

Rick

-Original Message-
From: Gerald Guido [mailto:gerald.gu...@gmail.com] 
Sent: Saturday, January 26, 2013 5:45 PM
To: cf-talk
Subject: Re: Getting Record Count


Something like this perhaps?

SELECThelp_topic_id , (SELECT count(help_topic_id)   FROM
mysql.help_relation )   as IDCount,help_keyword_id FROM
mysql.help_relation

LIMIT 10;


On Sat, Jan 26, 2013 at 12:41 PM, Rick Faircloth
r...@whitestonemedia.comwrote:


 If I'm running a query on a database
 and limit the records returned to 10,
 what's the best way to get the record count
 for the entire dataset if everything was
 return and not just the first 10 records?

 I can re-rerun the query without the 10-record
 limit, but that seems like a ridiculous
 approach, just to get the record count.

 Suggestions!

 Thanks,

 Rick



 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354085
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Acces a record count in javascript

2009-02-03 Thread Jason Congerton

Hi

I need to access a recordcount from within a javascript function, is this 
possible?

script
function checkBoxValidate(cb) {
for (j = 0; j  RECORD COUNT OF QUERY TO GO HERE; j++) {
if (eval(document.addCust.ckbox[ + j + ].checked) == true) {
document.addCust.ckbox[j].checked = false;
if (j == cb) {
document.addCust.ckbox[j].checked = true;
 }
  }
   }
}
//  End --
/script

Jason 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318746
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Acces a record count in javascript

2009-02-03 Thread Francois Levesque

Hi Jason,
If your javascript block is within cfoutput tags, you can just put
#myquery.recordcount# in there.

Francois Levesque
http://blog.critical-web.com/


On Tue, Feb 3, 2009 at 5:47 AM, Jason Congerton
ja...@jasoncongerton.co.ukwrote:


 Hi

 I need to access a recordcount from within a javascript function, is this
 possible?

 script
 function checkBoxValidate(cb) {
 for (j = 0; j  RECORD COUNT OF QUERY TO GO HERE; j++) {
 if (eval(document.addCust.ckbox[ + j + ].checked) == true) {
 document.addCust.ckbox[j].checked = false;
 if (j == cb) {
 document.addCust.ckbox[j].checked = true;
 }
  }
   }
 }
 //  End --
 /script

 Jason

 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318750
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Acces a record count in javascript

2009-02-03 Thread John M Bliss

Sure:

cfoutput
script
function checkBoxValidate(cb) {
for (j = 0; j #query.recordcount#; j++) {
if (eval(document.addCust.ckbox[ + j + ].checked) == true) {
document.addCust.ckbox[j].checked = false;
if (j == cb) {
document.addCust.ckbox[j].checked = true;
}
 }
  }
}
//  End --
/script
/cfoutput

On Tue, Feb 3, 2009 at 4:47 AM, Jason Congerton
ja...@jasoncongerton.co.ukwrote:


 Hi

 I need to access a recordcount from within a javascript function, is this
 possible?

 script
 function checkBoxValidate(cb) {
 for (j = 0; j  RECORD COUNT OF QUERY TO GO HERE; j++) {
 if (eval(document.addCust.ckbox[ + j + ].checked) == true) {
 document.addCust.ckbox[j].checked = false;
 if (j == cb) {
 document.addCust.ckbox[j].checked = true;
 }
  }
   }
 }
 //  End --
 /script

 Jason

 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318751
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Acces a record count in javascript

2009-02-03 Thread Patrick Santora

Jason,

It's important to remember that Javascript is commonly rendered AFTER
Coldfusion has compiled the page. This allows you to use Coldfusion to help
render such content.

Here is a basic request cycle to help show this:
Client makes request - Server proccess request (Coldfusion) - Server sends
back coldfusion rendered content - Client side scripting renders (example:
Javascript)

So as shown by the other posts you can output such things as recordsets to
the page to help dynamically generate the page.

-Pat
http://patweb99.avatu.com

On Tue, Feb 3, 2009 at 2:47 AM, Jason Congerton
ja...@jasoncongerton.co.ukwrote:


 Hi

 I need to access a recordcount from within a javascript function, is this
 possible?

 script
 function checkBoxValidate(cb) {
 for (j = 0; j  RECORD COUNT OF QUERY TO GO HERE; j++) {
 if (eval(document.addCust.ckbox[ + j + ].checked) == true) {
 document.addCust.ckbox[j].checked = false;
 if (j == cb) {
 document.addCust.ckbox[j].checked = true;
 }
  }
   }
 }
 //  End --
 /script

 Jason

 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318754
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Acces a record count in javascript

2009-02-03 Thread Jason Congerton

Hi Thanks to you all,

I was just missing the cfoutput tags!

Thanks!!

Jason,

It's important to remember that Javascript is commonly rendered AFTER
Coldfusion has compiled the page. This allows you to use Coldfusion to help
render such content.

Here is a basic request cycle to help show this:
Client makes request - Server proccess request (Coldfusion) - Server sends
back coldfusion rendered content - Client side scripting renders (example:
Javascript)

So as shown by the other posts you can output such things as recordsets to
the page to help dynamically generate the page.

-Pat
http://patweb99.avatu.com

On Tue, Feb 3, 2009 at 2:47 AM, Jason Congerton
ja...@jasoncongerton.co.ukwrote:

 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318759
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


SPRY record count

2007-04-24 Thread Chad McCue
I am using spry to display subcategories based on a selected category in
a drop down. I need a way to display this div divThere were no
subcategories found for the selected category/div when there was no
subcategories found and then if there were to display the div below. So
far it works fine when there are subcategories found.
 
div id=scats spry:region=dsSubcats style=margin-left:10px;
height:100px; width:200px; overflow:auto; border:1px solid ##00;
float:left; background-color:##efefef;
strongSelect Subcategories:/strong
ul class=createAccountForm
 li style=line-height:18px;  spry:repeat=dsSubcats
 input type=checkbox name=Subcategory value={CATEGORYID}
{CHECKED}  /{ds_RowNumber} {CATEGORYNAME}
 /li
/ul
/div


~|
ColdFusion MX7 and Flex 2 
Build sales  marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276097
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: SPRY record count

2007-04-24 Thread Massimo Foti
You should be able to do that using a spry:if condition

  
Massimo Foti, web-programmer for hire
Tools for ColdFusion and Dreamweaver developers:
http://www.massimocorner.com
  


- Original Message - 
From: Chad McCue [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Tuesday, April 24, 2007 1:40 PM
Subject: SPRY record count


I am using spry to display subcategories based on a selected category in
 a drop down. I need a way to display this div divThere were no
 subcategories found for the selected category/div when there was no
 subcategories found and then if there were to display the div below. So
 far it works fine when there are subcategories found.
 
 div id=scats spry:region=dsSubcats style=margin-left:10px;
 height:100px; width:200px; overflow:auto; border:1px solid ##00;
 float:left; background-color:##efefef;
 strongSelect Subcategories:/strong
 ul class=createAccountForm
 li style=line-height:18px;  spry:repeat=dsSubcats
 input type=checkbox name=Subcategory value={CATEGORYID}
 {CHECKED}  /{ds_RowNumber} {CATEGORYNAME}
 /li
 /ul
 /div


~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade  see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276100
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: SPRY record count

2007-04-24 Thread Chad McCue
Do you have an example of this. 



-Original Message-
From: Massimo Foti [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 24, 2007 7:56 AM
To: CF-Talk
Subject: Re: SPRY record count

You should be able to do that using a spry:if condition


Massimo Foti, web-programmer for hire
Tools for ColdFusion and Dreamweaver developers:
http://www.massimocorner.com
  


- Original Message -
From: Chad McCue [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Tuesday, April 24, 2007 1:40 PM
Subject: SPRY record count


I am using spry to display subcategories based on a selected category
in
 a drop down. I need a way to display this div divThere were no
 subcategories found for the selected category/div when there was no
 subcategories found and then if there were to display the div below.
So
 far it works fine when there are subcategories found.
 
 div id=scats spry:region=dsSubcats style=margin-left:10px;
 height:100px; width:200px; overflow:auto; border:1px solid ##00;
 float:left; background-color:##efefef;
 strongSelect Subcategories:/strong
 ul class=createAccountForm
 li style=line-height:18px;  spry:repeat=dsSubcats
 input type=checkbox name=Subcategory value={CATEGORYID}
 {CHECKED}  /{ds_RowNumber} {CATEGORYNAME}
 /li
 /ul
 /div




~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7  
Flex 2
Free Trial 
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276101
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: SPRY record count

2007-04-24 Thread Massimo Foti
 Do you have an example of this.

The doc below is a fundamental reading if you want to use Spry's datasets:
http://labs.adobe.com/technologies/spry/articles/data_set_overview/

The part on conditional processing:
http://labs.adobe.com/technologies/spry/articles/data_set_overview/#ConditionalConstructsSection



Massimo Foti, web-programmer for hire
Tools for ColdFusion and Dreamweaver developers:
http://www.massimocorner.com



~|
ColdFusion MX7 by Adobe®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276106
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


record count

2004-12-17 Thread Tim Laureska
I'm looking for a way of obtaining a count of records from a query where
only one particular field has data... 

I don't want to create a separate query for this just addressing this
field (ie. do recordcount where field NEQ  or some variation) but
would like to utilize  an existing query that includes that particular
field already in the select statement (among many others)

Is there an easy way to get a count of records obtained by a query where
data is in a field I'm interested in 

Hope that makes sense

Tim 



~|
Special thanks to the CF Community Suite Silver Sponsor - RUWebby
http://www.ruwebby.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188015
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: record count

2004-12-17 Thread Greg Morphis
what dbms? mysql? mssql? oracle? access?


On Fri, 17 Dec 2004 12:28:34 -0500, Tim Laureska [EMAIL PROTECTED] wrote:
 I'm looking for a way of obtaining a count of records from a query where
 only one particular field has data...
 
 I don't want to create a separate query for this just addressing this
 field (ie. do recordcount where field NEQ  or some variation) but
 would like to utilize  an existing query that includes that particular
 field already in the select statement (among many others)
 
 Is there an easy way to get a count of records obtained by a query where
 data is in a field I'm interested in
 
 Hope that makes sense
 
 Tim
 
 

~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188016
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: record count

2004-12-17 Thread Anthony Cooper
If I understand you correctly, you have already run the query in a 
cfquery/ tag and have a recordset, no?

If so, you could do a simple Query of Queries on this to further 
interrogate your results.

e.g.

cfquery name=rsNew dbtype=query
SELECT COUNT( something ) AS somethingCount
FROM rsExisting
WHERE NOT something IS NULL
/cfquery

Where 'rsExisting' is the name of your original recordset.

HTH,
Ant

On 17 Dec 2004, at 17:28, Tim Laureska wrote:

 I'm looking for a way of obtaining a count of records from a query 
 where
 only one particular field has data...

 I don't want to create a separate query for this just addressing this
 field (ie. do recordcount where field NEQ  or some variation) but
 would like to utilize  an existing query that includes that particular
 field already in the select statement (among many others)

 Is there an easy way to get a count of records obtained by a query 
 where
 data is in a field I'm interested in

 Hope that makes sense

 Tim



 

~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188022
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: record count

2004-12-17 Thread Ben Doom
QofQ?

--Ben

Tim Laureska wrote:
 I'm looking for a way of obtaining a count of records from a query where
 only one particular field has data... 
 
 I don't want to create a separate query for this just addressing this
 field (ie. do recordcount where field NEQ  or some variation) but
 would like to utilize  an existing query that includes that particular
 field already in the select statement (among many others)
 
 Is there an easy way to get a count of records obtained by a query where
 data is in a field I'm interested in 
 
 Hope that makes sense
 
 Tim 
 
 
 
 

~|
Special thanks to the CF Community Suite Silver Sponsor - CFDynamics
http://www.cfdynamics.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188024
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: record count

2004-12-17 Thread Tim Laureska
access

-Original Message-
From: Greg Morphis [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 17, 2004 12:21 PM
To: CF-Talk
Subject: Re: record count

what dbms? mysql? mssql? oracle? access?


On Fri, 17 Dec 2004 12:28:34 -0500, Tim Laureska [EMAIL PROTECTED]
wrote:
 I'm looking for a way of obtaining a count of records from a query
where
 only one particular field has data...
 
 I don't want to create a separate query for this just addressing this
 field (ie. do recordcount where field NEQ  or some variation) but
 would like to utilize  an existing query that includes that particular
 field already in the select statement (among many others)
 
 Is there an easy way to get a count of records obtained by a query
where
 data is in a field I'm interested in
 
 Hope that makes sense
 
 Tim
 
 



~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188028
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: record count

2004-12-17 Thread Tim Laureska
Thanks Anthony... but where is that any different from just doing
another query such as ... 

cfquery dsn=whatever name=count
SELECT field
FROM table
WHERE Field NEQ  OR field NEW NULL
/cfquery

cfoutput#count.recordcount#/cfoutput

maybe just hopeful dreaming...




-Original Message-
From: Anthony Cooper [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 17, 2004 12:37 PM
To: CF-Talk
Subject: Re: record count

If I understand you correctly, you have already run the query in a 
cfquery/ tag and have a recordset, no?

If so, you could do a simple Query of Queries on this to further 
interrogate your results.

e.g.

cfquery name=rsNew dbtype=query
SELECT COUNT( something ) AS somethingCount
FROM rsExisting
WHERE NOT something IS NULL
/cfquery

Where 'rsExisting' is the name of your original recordset.

HTH,
Ant

On 17 Dec 2004, at 17:28, Tim Laureska wrote:

 I'm looking for a way of obtaining a count of records from a query 
 where
 only one particular field has data...

 I don't want to create a separate query for this just addressing this
 field (ie. do recordcount where field NEQ  or some variation) but
 would like to utilize  an existing query that includes that particular
 field already in the select statement (among many others)

 Is there an easy way to get a count of records obtained by a query 
 where
 data is in a field I'm interested in

 Hope that makes sense

 Tim



 



~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188031
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: record count

2004-12-17 Thread Pascal Peters
It is not making a request to the db. As an alternative you could do

count = ListLen(ValueList(qMyQuery.myfield,chr(7)),chr(7))

I don't know if it would be faster than QofQ, and it will only work tou
count non empty fields in one column.

Pascal

 -Original Message-
 From: Tim Laureska [mailto:[EMAIL PROTECTED]
 Sent: 17 December 2004 19:05
 To: CF-Talk
 Subject: RE: record count
 
 Thanks Anthony... but where is that any different from just doing
 another query such as ...

~|
Special thanks to the CF Community Suite Silver Sponsor - CFDynamics
http://www.cfdynamics.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188032
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: record count

2004-12-17 Thread Greg Morphis
you can add a count(field) as field_count
however using this analytic function will force you to use a group by
in your query, thus possibly messing with output.
You'd have to use an aggregate function.
Here we use an Oracle database, 
for this I'd do something like
Select npa || nxx npanxx, count(npa) over () as npa_count
from phone_numbers


You might want to see if you can use an aggregate function like that..
It might actually be best to use a separate query though.

Good luck

On Fri, 17 Dec 2004 13:05:06 -0500, Tim Laureska [EMAIL PROTECTED] wrote:
 Thanks Anthony... but where is that any different from just doing
 another query such as ...
 
 cfquery dsn=whatever name=count
 SELECT field
 FROM table
 WHERE Field NEQ  OR field NEW NULL
 /cfquery
 
 cfoutput#count.recordcount#/cfoutput
 
 maybe just hopeful dreaming...
 
 
 -Original Message-
 From: Anthony Cooper [mailto:[EMAIL PROTECTED]
 Sent: Friday, December 17, 2004 12:37 PM
 To: CF-Talk
 Subject: Re: record count
 
 If I understand you correctly, you have already run the query in a
 cfquery/ tag and have a recordset, no?
 
 If so, you could do a simple Query of Queries on this to further
 interrogate your results.
 
 e.g.
 
 cfquery name=rsNew dbtype=query
SELECT COUNT( something ) AS somethingCount
FROM rsExisting
WHERE NOT something IS NULL
 /cfquery
 
 Where 'rsExisting' is the name of your original recordset.
 
 HTH,
 Ant
 
 On 17 Dec 2004, at 17:28, Tim Laureska wrote:
 
  I'm looking for a way of obtaining a count of records from a query
  where
  only one particular field has data...
 
  I don't want to create a separate query for this just addressing this
  field (ie. do recordcount where field NEQ  or some variation) but
  would like to utilize  an existing query that includes that particular
  field already in the select statement (among many others)
 
  Is there an easy way to get a count of records obtained by a query
  where
  data is in a field I'm interested in
 
  Hope that makes sense
 
  Tim
 
 
 
 
 
 

~|
Special thanks to the CF Community Suite Silver Sponsor - RUWebby
http://www.ruwebby.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188033
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Update query record count?

2004-02-13 Thread ChrisWD40
Is there a way to see how many (if any) records an update query has updated 
after it runs? Recordcount doesn't work.. Is there a way without doing another 
query?

Thanks,

Chris
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Update query record count?

2004-02-13 Thread Smith, Matthew P -CONT(CSC)
I don't believe so.If you are using a db that supports multiple SQL comands in onf cfquery tag, you could:

1.do a select instead of the update first
2.set an int(say, @myRowcount to @@rowcount
3.run your update
4.return @myRowcount AS RecordsUpdated

This is off the top of my head and there might be a better way, but that gets you what you need.

-Original Message-
From: [EMAIL PROTECTED]
To: CF-Talk
Sent: 2/13/04 9:05 AM
Subject: Update query record count?

Is there a way to see how many (if any) records an update query has
updated 
after it runs? Recordcount doesn't work.. Is there a way without doing
another 
query?

Thanks,

Chris
_
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: Update query record count?

2004-02-13 Thread ChrisWD40
I had in working in a 2 part w/ select, but was hoping to cut down to 1 query 
since it's being hit on every page to lower the DB load if possible.
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Update query record count?

2004-02-13 Thread Smith, Matthew P -CONT(CSC)
as long as you are using a db that supports multiple sql statements per cfquery tag, you really aren't killing your db that bad.move it to a stored proc and you are really g2g.

I had an app using a self-referncing table that had to do ton of recursive loops with recordsets looping and doing a couple-3 queries for each record in the initial record set.MS access was taking 4000+ ms for page render; ms sql with a single cfquery and a ton of sql statements and cursors and the like in a single cfquery tag was sub-100ms.

I think the biggest hit is cf making the odbc connection, especially if you have good indexes and a cached query plan(stored proc or cfqueryparam).Can another cf guru on the list verify?

-Original Message-
From: [EMAIL PROTECTED]
To: CF-Talk
Sent: 2/13/04 9:19 AM
Subject: Re: Update query record count?

I had in working in a 2 part w/ select, but was hoping to cut down to 1
query 
since it's being hit on every page to lower the DB load if possible.
_
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Update query record count?

2004-02-13 Thread Taco Fleur
If using MS SQL, @@ROWCOUNT will return exactly that what your after!

 
DECLARE @myVar INT

 
INSERT 

 
SET @myVar = @@ROWCOUNT

 
OR

 
INSERT 

 
SELECT @@ROWCOUNT AS myVar

 
Taco Fleur
Bloghttp://www.tacofleur.com/index/blog/
http://www.tacofleur.com/index/blog/
Methodology http://www.tacofleur.com/index/methodology/

Tell me and I will forget
Show me and I will remember
Teach me and I will learn 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Saturday, 14 February 2004 1:05 AM
To: CF-Talk
Subject: Update query record count?

Is there a way to see how many (if any) records an update query has updated 
after it runs? Recordcount doesn't work.. Is there a way without doing
another 
query?

Thanks,

Chris 
_
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Character count on record count??/

2003-03-12 Thread Janine Jakim
Maybe I'm making this harder than it is (that's usual for me)
It sounds easy enough-but I am stuck- let me show you my code

I have this:
!---Loop through the narratives for this student---
CFLOOP INDEX= X FROM =1 TO= #NarrativeGet.RecordCount#
CFSET I= ToString(X)
!---Set the fields for ActivePDF---
CFSET EduLevelNarative#I#
=Tlkt.SetFormFieldData(EduLevelNarrative#I#,#NarrativeGet.EduLevelNarrati
ve[I]#,0)
!---Here is my test output of the data- it shows correctly the length of
each narrative-
So the question is how do I get a sum or/do narrative + narrative +narrative
to get blocks of 5000?---
CFOUTPUT#(Len(NarrativeGet.EduLevelNarrative[I])#
/CFOUTPUT
/CFLOOP
Thanks,
j

-Original Message-
From: Ben Doom [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 11, 2003 5:17 PM
To: CF-Talk
Subject: RE: Character count on record count??/


: 2.  count the characters used in each narrative.

Retrieve the narratives and use len() on them.  Probably add some to it to
allow a break between narratives.

: 3.  Output the narratives in chuncks of 5000 characters. (or to the
: narratives that come close to 5000) For example
: narrative1=2000 characters
: narrative2= 50 characters
: narrative3=1000 characters
: narrative4=2000 characters
: so the page would only show the first 3 narratives

Since you (apparently) want them to show up in order, look at the first.  If
it's length is less than 5000 (I assume it always will be, is this true?),
add it to the 1st page and add its length to the total length of the first
page.  Repeat.  If the total length of the page will exceed 5000, start a
new page.

: Make sense? doable??

Yes and yes, I think.  :-)


--  Ben Doom
Programmer  General Lackey
Moonbow Software, Inc



~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: Character count on record count??/

2003-03-12 Thread Robertson-Ravo, Neil (RX)
Why can't you just use SQL?

SELECT LEN(yourfield) AS 'Length'

Neil

-Original Message-
From: Janine Jakim [mailto:[EMAIL PROTECTED]
Sent: 12 March 2003 14:27
To: CF-Talk
Subject: RE: Character count on record count??/


Maybe I'm making this harder than it is (that's usual for me)
It sounds easy enough-but I am stuck- let me show you my code

I have this:
!---Loop through the narratives for this student---
CFLOOP INDEX= X FROM =1 TO= #NarrativeGet.RecordCount#
CFSET I= ToString(X)
!---Set the fields for ActivePDF---
CFSET EduLevelNarative#I#
=Tlkt.SetFormFieldData(EduLevelNarrative#I#,#NarrativeGet.EduLevelNarrati
ve[I]#,0)
!---Here is my test output of the data- it shows correctly the length of
each narrative-
So the question is how do I get a sum or/do narrative + narrative +narrative
to get blocks of 5000?---
CFOUTPUT#(Len(NarrativeGet.EduLevelNarrative[I])#
/CFOUTPUT
/CFLOOP
Thanks,
j

-Original Message-
From: Ben Doom [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 11, 2003 5:17 PM
To: CF-Talk
Subject: RE: Character count on record count??/


: 2.  count the characters used in each narrative.

Retrieve the narratives and use len() on them.  Probably add some to it to
allow a break between narratives.

: 3.  Output the narratives in chuncks of 5000 characters. (or to the
: narratives that come close to 5000) For example
: narrative1=2000 characters
: narrative2= 50 characters
: narrative3=1000 characters
: narrative4=2000 characters
: so the page would only show the first 3 narratives

Since you (apparently) want them to show up in order, look at the first.  If
it's length is less than 5000 (I assume it always will be, is this true?),
add it to the 1st page and add its length to the total length of the first
page.  Repeat.  If the total length of the page will exceed 5000, start a
new page.

: Make sense? doable??

Yes and yes, I think.  :-)


--  Ben Doom
Programmer  General Lackey
Moonbow Software, Inc




~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
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

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: Character count on record count??/

2003-03-12 Thread Ben Doom
: !---Here is my test output of the data- it shows correctly the length of
: each narrative-
: So the question is how do I get a sum or/do narrative + narrative
: +narrative
: to get blocks of 5000?---
: CFOUTPUT#(Len(NarrativeGet.EduLevelNarrative[I])#
: /CFOUTPUT

Initialize a temp variable to 0.  Let's call it totalLen.  Also, you need
a counter to tell you what page you're on.  Each time you are about to try
to add a page, do something like

if (totalLen + len(NarrativeGet.EduLevelNarrative[i]) gt 5000)
{
totalLen = 0;
pageRef = pageRef + 1;
}
totalLen = totalLen + len(NarrativeGet.EduLevelNarrative[i]);
addToPage(pageRef, NarrativeGet.EduLeveNarrative[i]);

where addToPage() represents whatever has to be done to add the thing to a
page.

Please note that this is thrown together off the top of my head.  But it
seems to me to be in the right direction.

HTH.


--  Benjamin C. Doom
Programmer   [EMAIL PROTECTED]
Moonbow Software, Inc.   606.864.0041x4



~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: Character count on record count??/

2003-03-12 Thread Janine Jakim
Well the page part was easy enough to do.
It's the setting of the variable that I can't seem to get. I can set and
send the variable to a regular html page fine. It's the setting in
activePDF, which pulls the only the last
#NarrativeGet.EduLeveNarrative[i]#
(looks like each reiteration of the loop it resets it to the newest [i])
I'm wondering how I can dynamically concatenate
#NarrativeGet.EduLeveNarrative[1]#+#NarrativeGet.EduLeveNarrative[2]#
+#NarrativeGet.EduLeveNarrative[3]# for activepdf...argh
Thanks for all the insight
j
-Original Message-
From: Ben Doom [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 9:48 AM
To: CF-Talk
Subject: RE: Character count on record count??/


: !---Here is my test output of the data- it shows correctly the length of
: each narrative-
: So the question is how do I get a sum or/do narrative + narrative
: +narrative
: to get blocks of 5000?---
: CFOUTPUT#(Len(NarrativeGet.EduLevelNarrative[I])#
: /CFOUTPUT

Initialize a temp variable to 0.  Let's call it totalLen.  Also, you need
a counter to tell you what page you're on.  Each time you are about to try
to add a page, do something like

if (totalLen + len(NarrativeGet.EduLevelNarrative[i]) gt 5000)
{
totalLen = 0;
pageRef = pageRef + 1;
}
totalLen = totalLen + len(NarrativeGet.EduLevelNarrative[i]);
addToPage(pageRef, NarrativeGet.EduLeveNarrative[i]);

where addToPage() represents whatever has to be done to add the thing to a
page.

Please note that this is thrown together off the top of my head.  But it
seems to me to be in the right direction.

HTH.


--  Benjamin C. Doom
Programmer   [EMAIL PROTECTED]
Moonbow Software, Inc.   606.864.0041x4




~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: Character count on record count??/

2003-03-12 Thread Ben Doom
Why not just keep a running total inside the loop, as I thought I was
demonstrating?  Having never worked with ActivPDF, maybe I'm missing
something, but why wouldn't you simply keep track of how many characters
you've already added, rather than trying to re-calculate it each time?


--  Ben Doom
Programmer  General Lackey
Moonbow Software, Inc

: -Original Message-
: From: Janine Jakim [mailto:[EMAIL PROTECTED]
: Sent: Wednesday, March 12, 2003 11:06 AM
: To: CF-Talk
: Subject: RE: Character count on record count??/
:
:
: Well the page part was easy enough to do.
: It's the setting of the variable that I can't seem to get. I can set and
: send the variable to a regular html page fine. It's the setting in
: activePDF, which pulls the only the last
: #NarrativeGet.EduLeveNarrative[i]#
: (looks like each reiteration of the loop it resets it to the newest [i])
: I'm wondering how I can dynamically concatenate
: #NarrativeGet.EduLeveNarrative[1]#+#NarrativeGet.EduLeveNarrative[2]#
: +#NarrativeGet.EduLeveNarrative[3]# for activepdf...argh
: Thanks for all the insight
: j
: -Original Message-
: From: Ben Doom [mailto:[EMAIL PROTECTED]
: Sent: Wednesday, March 12, 2003 9:48 AM
: To: CF-Talk
: Subject: RE: Character count on record count??/
:
:
: : !---Here is my test output of the data- it shows correctly the
: length of
: : each narrative-
: : So the question is how do I get a sum or/do narrative + narrative
: : +narrative
: : to get blocks of 5000?---
: : CFOUTPUT#(Len(NarrativeGet.EduLevelNarrative[I])#
: : /CFOUTPUT
:
: Initialize a temp variable to 0.  Let's call it totalLen.
: Also, you need
: a counter to tell you what page you're on.  Each time you are about to try
: to add a page, do something like
:
: if (totalLen + len(NarrativeGet.EduLevelNarrative[i]) gt 5000)
: {
:   totalLen = 0;
:   pageRef = pageRef + 1;
: }
: totalLen = totalLen + len(NarrativeGet.EduLevelNarrative[i]);
: addToPage(pageRef, NarrativeGet.EduLeveNarrative[i]);
:
: where addToPage() represents whatever has to be done to add the thing to a
: page.
:
: Please note that this is thrown together off the top of my head.  But it
: seems to me to be in the right direction.
:
: HTH.
:
:
: --  Benjamin C. Doom
: Programmer   [EMAIL PROTECTED]
: Moonbow Software, Inc.   606.864.0041x4
:
:
:
:
: 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
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

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: Character count on record count??/

2003-03-12 Thread Janine Jakim
Running a cfoutput TotalLen/Narrative[I] looks fine on a regular display.
I think it's the behavior of activepdf that is the problem.
Each [i] must be identified/hardcoded on the pdf ie: Narrative1, narrative2,
Narrative3, Narrative4
So on my action page up to 5000 characters may make Narrative1 equal
Narrative1/Narrative2/Narrativd3

Does that make sense?


-Original Message-
From: Ben Doom [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 11:24 AM
To: CF-Talk
Subject: RE: Character count on record count??/


Why not just keep a running total inside the loop, as I thought I was
demonstrating?  Having never worked with ActivPDF, maybe I'm missing
something, but why wouldn't you simply keep track of how many characters
you've already added, rather than trying to re-calculate it each time?


--  Ben Doom
Programmer  General Lackey
Moonbow Software, Inc

: -Original Message-
: From: Janine Jakim [mailto:[EMAIL PROTECTED]
: Sent: Wednesday, March 12, 2003 11:06 AM
: To: CF-Talk
: Subject: RE: Character count on record count??/
:
:
: Well the page part was easy enough to do.
: It's the setting of the variable that I can't seem to get. I can set and
: send the variable to a regular html page fine. It's the setting in
: activePDF, which pulls the only the last
: #NarrativeGet.EduLeveNarrative[i]#
: (looks like each reiteration of the loop it resets it to the newest [i])
: I'm wondering how I can dynamically concatenate
: #NarrativeGet.EduLeveNarrative[1]#+#NarrativeGet.EduLeveNarrative[2]#
: +#NarrativeGet.EduLeveNarrative[3]# for activepdf...argh
: Thanks for all the insight
: j
: -Original Message-
: From: Ben Doom [mailto:[EMAIL PROTECTED]
: Sent: Wednesday, March 12, 2003 9:48 AM
: To: CF-Talk
: Subject: RE: Character count on record count??/
:
:
: : !---Here is my test output of the data- it shows correctly the
: length of
: : each narrative-
: : So the question is how do I get a sum or/do narrative + narrative
: : +narrative
: : to get blocks of 5000?---
: : CFOUTPUT#(Len(NarrativeGet.EduLevelNarrative[I])#
: : /CFOUTPUT
:
: Initialize a temp variable to 0.  Let's call it totalLen.
: Also, you need
: a counter to tell you what page you're on.  Each time you are about to try
: to add a page, do something like
:
: if (totalLen + len(NarrativeGet.EduLevelNarrative[i]) gt 5000)
: {
:   totalLen = 0;
:   pageRef = pageRef + 1;
: }
: totalLen = totalLen + len(NarrativeGet.EduLevelNarrative[i]);
: addToPage(pageRef, NarrativeGet.EduLeveNarrative[i]);
:
: where addToPage() represents whatever has to be done to add the thing to a
: page.
:
: Please note that this is thrown together off the top of my head.  But it
: seems to me to be in the right direction.
:
: HTH.
:
:
: --  Benjamin C. Doom
: Programmer   [EMAIL PROTECTED]
: Moonbow Software, Inc.   606.864.0041x4
:
:
:
:
: 

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: Character count on record count??/

2003-03-12 Thread Ben Doom
: Running a cfoutput TotalLen/Narrative[I] looks fine on a regular display.
: I think it's the behavior of activepdf that is the problem.
: Each [i] must be identified/hardcoded on the pdf ie: Narrative1,
: narrative2,
: Narrative3, Narrative4
: So on my action page up to 5000 characters may make Narrative1 equal
: Narrative1/Narrative2/Narrativd3
:
: Does that make sense?

Not really, but I'll try not to blame you for it.  :-)

Why don't you run the loop creating a set of variables with dynamic names
(ie page1, page2, etc) by concatenating the Narratives.  That way you have
'hard' variable names.  Then, when the loop which concatenates the contents
is done, you run a second loop which takes each page and inserts it into a
page in the PDF.

Did that make sense?

--Ben


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Character count on record count??/

2003-03-11 Thread Janine Jakim
I have a page where teachers write narratives on students- this will be sent
to a pdf. I'm wondering about all of the empty space- each page can hold
5000 characters. Depending on the teacher groups a student may have a 1 -6
page narrative...(ie: one teacher may write 200 characters/another
1500/etc...)What I want to do is figure out- how to put these narratives
together without a bunch of space between the entries. (ie: we discussed
blocks of 1250 characters, but that may look odd if teachers do not write
much)
1. record count of narratives (know how to do that)
2.  count the characters used in each narrative.
3.  Output the narratives in chuncks of 5000 characters. (or to the
narratives that come close to 5000) For example 
narrative1=2000 characters
narrative2= 50 characters
narrative3=1000 characters
narrative4=2000 characters
so the page would only show the first 3 narratives
Make sense? doable??
thanks,
j

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: Character count on record count??/

2003-03-11 Thread Ben Doom
: 2.  count the characters used in each narrative.

Retrieve the narratives and use len() on them.  Probably add some to it to
allow a break between narratives.

: 3.  Output the narratives in chuncks of 5000 characters. (or to the
: narratives that come close to 5000) For example
: narrative1=2000 characters
: narrative2= 50 characters
: narrative3=1000 characters
: narrative4=2000 characters
: so the page would only show the first 3 narratives

Since you (apparently) want them to show up in order, look at the first.  If
it's length is less than 5000 (I assume it always will be, is this true?),
add it to the 1st page and add its length to the total length of the first
page.  Repeat.  If the total length of the page will exceed 5000, start a
new page.

: Make sense? doable??

Yes and yes, I think.  :-)


--  Ben Doom
Programmer  General Lackey
Moonbow Software, Inc


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



How to Count? or Record Count?

2000-07-12 Thread Paul Ihrig

Ok this is going to sound a bit odd since i am not sure how to word it.

i have my little query: [in my admin page for viewing who has signed up for
the class]

[[from dataview01.cfm]]

cfquery name="rsSignedUP" datasource="practice"  
SELECT tbl_Employee.EmployeeID, tbl_Employee.LastName,
tbl_Employee.FirstName, tbl_Employee.Email, tbl_Class.ClassID,
tbl_Class.ClassName, tbl_Class.ClassDate, tbl_SignUp.SignUpID,
tbl_SignUp.SU_DateOfferdID, tbl_SignUp.SU_EmployeeID, tbl_SignUp.Completed,
tbl_SignUp.CreateDate 
FROM tbl_Employee, tbl_Class, tbl_SignUp 
WHERE EmployeeID = SU_EmployeeID
AND ClassID = SU_DateOfferdID 
AND ClassName = 'Human Resource Mgmt'
ORDER BY #DefOrder#
/cfquery

Which is grabbing a list of employees which could have signed up for 1
class, given on 2 differnt dates.

My problem is, that the class size needs to be limited to 25 people.
This is stated on my main form.

it also shows how many people are currently singed up for class 01  class
02.
[[from signup01.cfm]]

cfquery name="rsDate01" datasource="practice"  
SELECT SignUpID, SU_DateOfferdID 
FROM tbl_SignUp 
WHERE SU_DateOfferdID = 1
/cfquery

cfquery name="rsDate02" datasource="practice"  
SELECT SU_DateOfferdID 
FROM tbl_SignUp 
WHERE SU_DateOfferdID = 2
/cfquery

[[the display]]

A limit of 25 spaces are available per class per day.
You will be notified if you are selected for the class  time.
.   cfoutput#rsDate01_total#/cfoutput  people have signed up so far
for 
cfoutput# LSDateFormat(rsDisplayDate01.ClassDate, ', 
   DD, ') #/cfoutput.br
  
bcfoutput#rsDate02_total#/cfoutputnbsp/b 
people for cfoutput# LSDateFormat(rsDisplayDate02.ClassDate,
', 
   DD, ') #/cfoutput

So, on the form i show how many have signed up.

But on the admin page, i cant figure out how to show who has signed up in
sequential order.
Because on one admin page i have 2 seperate date/times they could sign up.

Its not really abig deal.
i would just like to know how to get the number of the last insert Total + 1
as the number that realates to the student who signed up.??
I know i should have used a sepereate table for each Class/time.

mabey i will redo it from the ground up.
But since it is 10 different classes with 2 times each, spread out over the
next year.
I wanted to be able to track Student/employees progress through this
"Practice Manegment" class.

lol
no one will read this!

Thanks if you do!

-paul

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: How to Count? or Record Count?

2000-07-12 Thread KChapman

I could be totally wrong here but I'm assuming that tbl_SignUp.CreateDate is the time 
that they signed up.  Am I right?

If I am you could just do this

cfquery name="rsSignedUP" datasource="practice"  
SELECT tbl_Employee.EmployeeID, tbl_Employee.LastName,
tbl_Employee.FirstName, tbl_Employee.Email, tbl_Class.ClassID,
tbl_Class.ClassName, tbl_Class.ClassDate, tbl_SignUp.SignUpID,
tbl_SignUp.SU_DateOfferdID, tbl_SignUp.SU_EmployeeID, 
tbl_SignUp.Completed,
tbl_SignUp.CreateDate 
FROM tbl_Employee, tbl_Class, tbl_SignUp 
WHERE EmployeeID = SU_EmployeeID
AND ClassID = SU_DateOfferdID 
AND ClassName = 'Human Resource Mgmt'
ORDER BY tbl_Class.ClassDate, tbl_SignUp.CreateDate, #DefOrder#
/cfquery

This sort order would put the classes together, then put them in order by 
who signed up when, then whatever #DefOrder# is.

Is that what you wanted?

--K


Katrina Chapman
Consultant 
Ameriquest Mortgage




Paul Ihrig [EMAIL PROTECTED]
07/12/00 09:13 AM
Please respond to cf-talk

 
To: "'[EMAIL PROTECTED]'" [EMAIL PROTECTED]
cc: 
Subject:    How to Count? or Record Count?

Ok this is going to sound a bit odd since i am not sure how to word it.

i have my little query: [in my admin page for viewing who has signed up 
for
the class]

[[from dataview01.cfm]]

cfquery name="rsSignedUP" datasource="practice"  
SELECT tbl_Employee.EmployeeID, tbl_Employee.LastName,
tbl_Employee.FirstName, tbl_Employee.Email, tbl_Class.ClassID,
tbl_Class.ClassName, tbl_Class.ClassDate, tbl_SignUp.SignUpID,
tbl_SignUp.SU_DateOfferdID, tbl_SignUp.SU_EmployeeID, 
tbl_SignUp.Completed,
tbl_SignUp.CreateDate 
FROM tbl_Employee, tbl_Class, tbl_SignUp 
WHERE EmployeeID = SU_EmployeeID
AND ClassID = SU_DateOfferdID 
AND ClassName = 'Human Resource Mgmt'
ORDER BY #DefOrder#
/cfquery

Which is grabbing a list of employees which could have signed up for 1
class, given on 2 differnt dates.

My problem is, that the class size needs to be limited to 25 people.
This is stated on my main form.

it also shows how many people are currently singed up for class 01  class
02.
[[from signup01.cfm]]

cfquery name="rsDate01" datasource="practice"  
SELECT SignUpID, SU_DateOfferdID 
FROM tbl_SignUp 
WHERE SU_DateOfferdID = 1
/cfquery

cfquery name="rsDate02" datasource="practice"  
SELECT SU_DateOfferdID 
FROM tbl_SignUp 
WHERE SU_DateOfferdID = 2
/cfquery

[[the display]]

A limit of 25 spaces are available per class per day.
You will be notified if you are selected for the class  time.
.   cfoutput#rsDate01_total#/cfoutput  people have signed up so 
far
for 
cfoutput# LSDateFormat(rsDisplayDate01.ClassDate, ', 
   DD, ') #/cfoutput.br
 
bcfoutput#rsDate02_total#/cfoutputnbsp/b 
people for cfoutput# LSDateFormat(rsDisplayDate02.ClassDate,
', 
   DD, ') #/cfoutput

So, on the form i show how many have signed up.

But on the admin page, i cant figure out how to show who has signed up in
sequential order.
Because on one admin page i have 2 seperate date/times they could sign up.

Its not really abig deal.
i would just like to know how to get the number of the last insert Total + 
1
as the number that realates to the student who signed up.??
I know i should have used a sepereate table for each Class/time.

mabey i will redo it from the ground up.
But since it is 10 different classes with 2 times each, spread out over 
the
next year.
I wanted to be able to track Student/employees progress through this
"Practice Manegment" class.

lol
no one will read this!

Thanks if you do!

-paul

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' 
in the body.



--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: How to Count? or Record Count?

2000-07-12 Thread Paul Ihrig

Ok.
I am able to get one class id inserted besed on the record count.
My problem now is at the bottom of this page.

it needs to be conditional on wether the insert is for date/time 01 or
date/time 02.
But how is my form suposed to know what date has been selected befor the
actual submit button is hit?

i need a 
CFIF ClassID = 1
input type="hidden" name="SU_Number1" value="cfoutput#rsDate01_total# +
1/cfoutput"
CFELSE
input type="hidden" name="SU_Number2" value="cfoutput#rsDate02_total# +
1/cfoutput"
/CFIF
/CFIF

any help would be awsome!
thanks

-paul



!--- CODE BELOW ---

cfquery name="rsClass" datasource="practice"  
SELECT ClassID, ClassName, ClassTeacher, ClassEmail, ClassDescription,
ClassRoom, 
ClassStartTime, ClassEndTime, ClassDate 
FROM tbl_Class 
WHERE ClassID = 1 
OR ClassID = 2 
/cfquery

cfquery name="rsDate01" datasource="practice"  
SELECT SignUpID, SU_DateOfferdID 
FROM tbl_SignUp 
WHERE SU_DateOfferdID = 1 
/cfquery

cfquery name="rsDate02" datasource="practice"  
SELECT SU_DateOfferdID 
FROM tbl_SignUp 
WHERE SU_DateOfferdID = 2 
/cfquery

select name="slctDate"
  cfloop query="rsClass" 
option value="cfoutput#rsClass.ClassID#/cfoutput"
selectedcfoutput 
  # LSDateFormat(rsClass.ClassDate, ',  DD, ') #
/cfoutput/option
   /cfloop 
/select

td width="123" font face="Arial, Helvetica, sans-serif"
input type="hidden" name="SU_Number1"
value="cfoutput#rsDate01_total# + 1/cfoutput"
input type="hidden" name="SU_Number2"
value="cfoutput#rsDate02_total# + 1/cfoutput"
/font/td
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: How to Count? or Record Count?

2000-07-12 Thread Paul Ihrig

Katrina 
close, i can Really use that.

i wanted to create a number list, just the way you explained.
that wouldnt be entered into any table, but just generated.

so that when some one sign up twice  i delete them from the admin page
the number would be recaluculated? also so i can keep track of how close to
25 for each class.

4 signed up for class date of 8/08/00   
3 signed up for class date of 8/17/00   

 Name   Class
ClassDateSignUp Date  Delete 

01 Aldrich Merrill  Human Resource Mgmt  8/08/00
7/12/00 || 3:32:01 PM  Delete  
02 Schardt Sydney Human Resource Mgmt  8/08/00
7/11/00 || 3:24:13 PM  Delete  
03 Kelly Kathy  Human Resource Mgmt  8/08/00
7/11/00 || 6:40:09 PM  Delete  
01 Patton Stephanie Human Resource Mgmt  8/17/00 7/12/00 ||
7:14:46 AM  Delete  
04 Ihrig Paul   Human Resource Mgmt  8/08/00
7/12/00 || 8:17:13 AM  Delete  
02 Nichols Todd Human Resource Mgmt  8/17/00
7/12/00 || 8:18:00 AM  Delete  
03 Chobo Jennifer   Human Resource Mgmt  8/17/00
7/12/00 || 8:19:47 AM  Delete   

Thank a bunch!

-paul
 -Original Message-
 From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
 Sent: Wednesday, July 12, 2000 1:33 PM
 To:   [EMAIL PROTECTED]
 Subject:  Re: How to Count? or Record Count?
 
 I could be totally wrong here but I'm assuming that tbl_SignUp.CreateDate
 is the time that they signed up.  Am I right?
 
 If I am you could just do this
 
 cfquery name="rsSignedUP" datasource="practice"  
 SELECT tbl_Employee.EmployeeID, tbl_Employee.LastName,
 tbl_Employee.FirstName, tbl_Employee.Email, tbl_Class.ClassID,
 tbl_Class.ClassName, tbl_Class.ClassDate, tbl_SignUp.SignUpID,
 tbl_SignUp.SU_DateOfferdID, tbl_SignUp.SU_EmployeeID, 
 tbl_SignUp.Completed,
 tbl_SignUp.CreateDate 
 FROM tbl_Employee, tbl_Class, tbl_SignUp 
 WHERE EmployeeID = SU_EmployeeID
 AND ClassID = SU_DateOfferdID 
 AND ClassName = 'Human Resource Mgmt'
 ORDER BY tbl_Class.ClassDate, tbl_SignUp.CreateDate, #DefOrder#
 /cfquery
 
 This sort order would put the classes together, then put them in order by 
 who signed up when, then whatever #DefOrder# is.
 
 Is that what you wanted?
 
 --K
 
 
 Katrina Chapman
 Consultant 
 Ameriquest Mortgage
 
 
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.