There are two ways, and the preferred one probably depends on your system, as best as I know.
You can do a count() on the table, but that will require a full table-scan in most cases. On the other hand, you can just do a straight-forward select query. If a row is returned, then you know there is a user in the DB. That will likely be faster, especially if you can use an index to retrieven the row. HTH, Paul On Sun, 19 Jan 2003, alex wrote: > is it a good idea doing a count()? i need to test if a user is in the system > or not... if i count i get a row with 0 or 1... count is fast... but what is > the fastest way? speed is one of the highest prioritys for this script... > > > Alex > >
