Ask a Question related to Coldfusion Database Access, Design and Development.
-
bpiersant #1
CFIF return RecordCount EQ 0
Hi - need to check if there is a record in a MySQL database. If there is
display it if there not show a default Address. Here's what I have. It doen't
work though. Any ideas? <cfquery name='qGetSomeData'
datasource='SQL_ServerDS_Name'> SELECT 'A' AS B </cfquery>
<cfoutput> <cfif qGetSomeData.RecordCount EQ 0> <h2>There ain't
no such data rows (neither)!</h2> <cfelse> ... Displaying my
results here ... </cfif> </cfoutput>
bpiersant Guest
-
Dynamic RecordCount
I am looping through a list of sites and counting the number of articles live and pending. I'd like to be able to refer to the RecordCount for... -
Indirect recordcount
I have a variable that contains the name of a query. How can I get the RecordCount for that query? I've tried using Evaluate() in several... -
Getting a recordcount
Hi I have opened a database in PHP and would like to know whether a particular record exists. i.e. $ThisUsername = $_REQUEST;... -
recordset.recordcount return allways -1 on select statements
Greetings On my ASP application I want to retrieve the number (Recordset.recordCount property) of records affected by a select statement, but I... -
recordcount -1
I'm simply trying to get a number of records returned in a recordset, and just get a -1. I have looke din a few books and other references, can't... -
cf_menace #2
Re: CFIF return RecordCount EQ 0
That should work.
Try <cfdump var="#qGetSomeData#"> to see what's being returned to the query.
cf_menace Guest
-
Sameer #3
Re: CFIF return RecordCount EQ 0
Instead of SELECT 'A' AS B, do a real query from a table in the database.
Once you do query a table, do this : -
<cfif qGetSomeData.RecordCount>
<cfoutput query="qGetSomeData">
....display results......
</cfoutput>
<cfelse>
<h2>Empty!</h2>
</cfif>
Sameer Guest



Reply With Quote

