PHP / MYSQL error: mysql_num_rows(): supplied argument is not a valid [closed]
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I have the following code: $sql = mysql_query("SELECT id FROM logins WHERE id='" . $this->skID . "'"); if(mysql_num_rows($sql) == 0) { return false; } else { list($skID) = mysql_fetch_row($sql); return $skID; } which brings back the below error. mysql_num_rows(): supplied argument is not a valid MySQL result