Re: help on the cfif code

2006-10-30 Thread RichL
Hi Alex Glad to hear that you got it sorted Your solution seems to suggest that you have got a cfsetting enablecfoutput=yes being used somewhere in the code (perhaps in an application.cfm/cfc page ? ) and that that is why you need to the cfoutput to get your html tags to render

Re: help on the cfif code

2006-10-29 Thread alex poyaoan
Hi all Thanks for all your clarifications with all the testing and the cfdumps you suggested I resolved everything with that with a cfoutput after the cfif and another at the cfelse... Just got the idea with the code that Rich suggested earlier and with the cfdump after the cfif and cfelse

help on the cfif code

2006-10-27 Thread alex poyaoan
hi everybody i have this code that checks if the recordcount of the query is not equal to 0 it gives me the list if not on the cfelse it should give me a message but it just doesn't the list is blank... thanks so much just trying to for hours but couldn't just get what i want CFIF

Re: help on the cfif code

2006-10-27 Thread RichL
Alex That code seems to work ok ... I am not sure I understand exactly what your problem is ... I am getting a link if there are records from the query and a message if there isn't any records Can you explain more about what your poblem is? Rich On 10/27/06, alex poyaoan [EMAIL PROTECTED]

Re: help on the cfif code

2006-10-27 Thread alex poyaoan
Alex That code seems to work ok ... I am not sure I understand exactly what your problem is ... I am getting a link if there are records from the query and a message if there isn't any records Can you explain more about what your poblem is? Rich On 10/27/06, alex poyaoan [EMAIL PROTECTED]

Re: help on the cfif code

2006-10-27 Thread RichL
Hmm I am not sure I fully understand...at the moment your code will output 'no risorce' in place of any links when there are no records returned. Is this what you want? This is what is happening for me On 10/27/06, alex poyaoan [EMAIL PROTECTED] wrote: Alex That code seems to work ok ... I

Re: help on the cfif code

2006-10-27 Thread alex poyaoan
Hmm I am not sure I fully understand...at the moment your code will output 'no risorce' in place of any links when there are no records returned. Is this what you want? This is what is happening for me On 10/27/06, alex poyaoan [EMAIL PROTECTED] wrote: yes that is what i want but what is

Re: help on the cfif code

2006-10-27 Thread RichL
Hmm I am a little stumped The only things that I can think of: - are you using Cfsetting enablecfoutput=yes anywhere ? try wrapping the text in cfoutput tags - although I don't think that it is this otherwise your links wouldn't output whent there are records - some kind of CSS overide ? seems

Re: help on the cfif code

2006-10-27 Thread alex poyaoan
Hmm I am a little stumped The only things that I can think of: - are you using Cfsetting enablecfoutput=yes anywhere ? try wrapping the text in cfoutput tags - although I don't think that it is this otherwise your links wouldn't output whent there are records - some kind of CSS overide ? seems

Re: help on the cfif code

2006-10-27 Thread RichL
Alex Have you tested if the code is definitely dropping to the 'else' condition when there are no records being retrieved - try out putting the recordcount to make sure you know what you are getting back from the query or dumping the contents before the conditional block - on the else

Re: help on the cfif code

2006-10-27 Thread alex poyaoan
Alex Have you tested if the code is definitely dropping to the 'else' condition when there are no records being retrieved - try out putting the recordcount to make sure you know what you are getting back from the query or dumping the contents before the conditional block - on the else

Re: help on the cfif code

2006-10-27 Thread Peter Tilbrook
Alex Have you tested if the code is definitely dropping to the 'else' condition when there are no records being retrieved - try out putting the recordcount to make sure you know what you are getting back from the query or dumping the contents before the conditional block - on the else

Re: help on the cfif code

2006-10-27 Thread Peter Tilbrook
If a CFQUERY returns no records it does not exist so there is no way to test for zero records as no result is produced. You need to tackle it along the lines of: cfif MyQuery.RecordCount Yes a result was made - ColdFusion has results ready to be handled. cfelse Na da. No response from the

Re: help on the cfif code

2006-10-27 Thread alex poyaoan
If a CFQUERY returns no records it does not exist so there is no way to test for zero records as no result is produced. You need to tackle it along the lines of: cfif MyQuery.RecordCount Yes a result was made - ColdFusion has results ready to be handled. cfelse Na da. No response

Re: help on the cfif code

2006-10-27 Thread James Holmes
On 10/27/06, Peter Tilbrook [EMAIL PROTECTED] wrote: If a CFQUERY returns no records it does not exist so there is no way to test for zero records as no result is produced. That's incorrect: cfquery datasource=myDS name=QTest SELECT * FROM sometable WHERE 1=0 /cfquery

Re: help on the cfif code

2006-10-27 Thread alex poyaoan
On 10/27/06, Peter Tilbrook [EMAIL PROTECTED] wrote: If a CFQUERY returns no records it does not exist so there is no way to test for zero records as no result is produced. That's incorrect: cfquery datasource=myDS name=QTest SELECT * FROM sometable WHERE 1=0

Re: help on the cfif code

2006-10-27 Thread RichL
Peter are you quite sure about that? You are saying a query object will not exist from a query that returns no records? Try running a query with no records and dumping the query object? Does it complain of not existing or display an empty recordset? I think you'll find it is the latter Your

Re: help on the cfif code

2006-10-27 Thread Doug Brown
Basically he is saying that you need not use a comparison operator with ..recordCount. I have tried your code the way you have written it and all is good though. I would say that your problem lies in what is being output by your database. I am thinking you have a problem with hidden characters

Re: help on the cfif code

2006-10-27 Thread Mingo Hagen
No that's not it, 0 translates to false in CF. So if myQuery.recordcount is 0, then cfif myQuery.recordcount would return false. My suspicion is that you have somewhere in your code a cfsetting enablecfoutputonly=yes. Is the code you posted earlier the actual code, or is it just an example?

Re: help on the cfif code

2006-10-27 Thread RichL
Hmm I did raise that point earlier Mingo but Alex says he isn't ... unless like you say it is being set elsewhere Alex you may want to add cfsetting enablecfoutput=no just before this code to check this or alternatively... the cfoutputpno risorse/p/cfoutput should override this ok... to try

Re: help on the cfif code

2006-10-27 Thread RichL
Hmm I disagree on both accounts I Doug - Peter was saying that the syntax was invalid and not fit for the situation not just that you don't need an operator - which isn't true - it seems from what Alex is saying that he is dropping in to the else condition as he seems to be suggesting there

Re: help on the cfif code

2006-10-27 Thread Claude Schneegans
If a CFQUERY returns no records it does not exist This is not true, If a CFQUERY returns no records, the query exists and have all columns set to empty strings. -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm

Re: help on the cfif code

2006-10-27 Thread Jake Churchill
cfif query.recordcount Claude Schneegans wrote: If a CFQUERY returns no records it does not exist This is not true, If a CFQUERY returns no records, the query exists and have all columns set to empty strings. ~|