Home >Backend Development >PHP Tutorial >mysql_fetch_array怎么屏蔽无数据异常提示

mysql_fetch_array怎么屏蔽无数据异常提示

WBOY
WBOYOriginal
2016-06-13 11:43:30978browse

mysql_fetch_array如何屏蔽无数据错误提示
我在做PHP连接数据库时,用mysql_fetch_array取数据库数据。
但是如果数据库中表没有内容时,会提示至少需要1个元素的错误提示。
我想做成如果没有数据,输出"没有数据",并不会显示php错误提示,请问怎么做?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn