php 在执行mysql 失败后 如何写异常提示

WBOY
Release: 2016-06-13 11:54:01
Original
1141 people have browsed it

php 在执行mysql 失败后 怎么写错误提示
在写php时 有时因为输入的字段超出 在mysql 设的字段长度 虽然 语句执行正常 但在数据库中没有成功加入 求提示写法
------解决方案--------------------
mysql_query($sql) die(mysql_error());

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template