Pragmatically speaking, if there are no rows returned, the fetch*() call won't loop very many times. (Assuming 'zero' is akin to 'not very many').
The practical approach would be to issue a SELECT COUNT(*) query, which makes the database do the counting. | [reply] |
whats the correct syntax in perl for that selection with regard to the $sth5 selection step
| [reply] |
What chromatic is saying is that if you want to see the number of rows a query will return, a good way is to issue an explicit SELECT COUNT(*) FROM tablename WHERE field_value = whatever and get the return value BEFORE you issue the SELECT to get the value.
Philosophy can be made out of anything. Or less -- Jerry A. Fodor
| [reply] [d/l] [select] |
With the MySQL DBI it will allow you to call
fetchrow forever if nothing is returned. Throwing errors.
- Ant
| [reply] |