in reply to Counter Issue
Could you use a variation of the following (perhaps a syntactically correct version would be better than mine) to let the DBMS itself do the counting? It would be far more efficient, as it only has to return a single result to you, rather than a set of results that you then iterate over. You could modify it to count the various items you want.
SELECT count(*) FORM table1 WHERE day='$d' AND month='$m_num' AND year='$y'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Counter Issue
by Anonymous Monk on Jun 25, 2004 at 15:47 UTC |