what is the best better for this kind `if (IsDefin...
# cfml-beginners
s
what is the best better for this kind
if (IsDefined("myquery.startDate") ) {
d
are you checking for recordcount before this?
a
Back up slightly. Why would you not know what columns are in your query? Now, I know there can be reasons for this, but what are your specific reasons? And, again, [insert the usual spiel about how to asks question properly here].
Best for what? What actual problem are you trying to solve?
1
s
no recordcount check
f
if you are checking if the query has rows (a recordcount that is not zero), then you can do
if ( myquery.recordcount ) { ... }
d
Yeah I recommend do a recordcount check first. Also Share more of your code and we'll be able to understand the problem.
1