it means the argument ($var) you set within the function call is not returning a resource that the script can read
remember mysql_num_rows is only for inserts and the link identifier should reference the mysql_query rather than the mysql_fetch_array/??
if everything else seems fine, try slinging an
after your query line.