[thelist] something wrong with my SQL query

Rich Gray rich at f1central.net
Wed Nov 20 18:05:01 CST 2002


yep, if the 'where ...' is loose... then lots of 1's ...

assert(GG->_RIP());

Rich
-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of rudy
Sent: 20 November 2002 15:36
To: thelist at lists.evolt.org
Subject: Re: [thelist] something wrong with my SQL query


> 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

--
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !





More information about the thelist mailing list