I am getting serious deja vu here: we have been here before!
SELECT COUNT(*) FROM...
Returns a dataset containing one row. Always.
That row, has one column. Always.
The single cell in the entire dataset contains the number of matching rows in the database.
This could be 0, 1, or any other integral value.
So numrows - being the count of the number of rows returned - will always be one. Always.
So your test
if (numrows >= 1)
will always suceed. Always. Always. Always.
[edit]Added an extra "Always" for good measure. :D[/edit]
[edit]Just for drama, an extra "Always" added[/edit]