php怎的显示mysql的warning信息

WBOY
Release: 2016-06-13 12:04:41
Original
1001 people have browsed it

php怎样显示mysql的warning信息?
php怎样显示mysql的warning信息?

例如:   table里有一个type是date的数据.
如果我在phpmyadmin里输入string之类的,会显示warning信息.

但我用php更新数据的话,会把这个数据变成0000-00-00.
怎样用php更新数据后,如果数据格式不对,显示这个warning信息呢?

thx
------解决方案--------------------
mysql_error()  
试试这个?
------解决方案--------------------
mysql_query("SHOW WARNINGS");
可以取到warning信息

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