For some reason I keep getting an error for the mysql_result line, even when it shouldn't be executed (when the username doesn't exist, ie $result evaluates to false).推荐答案mysql_query 只会在出现错误时返回 false.在这种情况下没有错误,只有 0 行.mysql_query will only return false if there is an error. In this case there is no error, there are just 0 rows.您需要使用 mysql_num_rows 来获取返回的行数.You need to use mysql_num_rows to get the number of rows returned. 这篇关于MySQL查询表现得很奇怪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-24 12:13