Because the number of rows returned only makes sense with a particular result set. However, for a SELECT query mysqli_query() can return a result resource (representing a result set) or false (a boolean).
Here its not fetching anything,is the connection ok
lynda.com provides video tutorial for PHP MYSQL , very good ,illustrative covers each part very clearly.
PHP MYSQL essential & PHP MYSQL ADVANCED r two of their tutorial, easily found on google or thei site.