sharetop,
Please see the PHP online docs at:
http://www.php.net/manual/function.odbc-num-rows.php
regarding this issue. Note the last line before the comments:
"Note: Using odbc_num_rows() to determine the number of rows available after a SELECT will return -1 with many drivers."
This appears to be an issue with the ODBC drivers you're hooking into, not the PHP engine. I ran into this one myself doing ODBC calls to a MS Access db in WinNT4/IIS. Your best bet, depending on the size of the returned table to the query, is either perform 2 queries (the first being SELECT COUNT(*)... , then your original), or step through the results using odbc_fetch_row() to get a count. Just a thought.
For more info on ODBC calls in PHP, I have found the online docs very helpful (not to mention the user comments posted below the docs). You can find them at
http://www.php.net/manual/ref.odbc.php
Good luck.