[thelist] something wrong with my SQL query

rudy r937 at interlog.com
Wed Nov 20 17:37:00 CST 2002


> There's no significance in using the number 1

at the risk of flaying the already dead horse some more...

yes, there is no significance in the number 1 (i use it a lot in
WHERE EXISTS subqueries), except for one thing --

you'll get as many 1's as there are rows in the table

if there are thousands of rows, you will get thousands of 1's

maybe it's me, but i'd rather have the slick performance
that comes with getting only one row that contains count(*)

;o)


> but it quite handily equates to true in PHP...

that "handiness" can bite you

ask ben in that other thread on recordcount in cfmx


rudy




More information about the thelist mailing list