相关文章推荐
爱看球的哑铃  ·  python虚拟环境venv ...·  1 年前    · 
严肃的烈酒  ·  服务端渲染Nuxt - 掘金·  1 年前    · 
飘逸的口罩  ·  SQL ...·  1 年前    · 
瘦瘦的山羊  ·  Error in loading DLL ...·  1 年前    · 
无邪的橙子  ·  2019-01-02 css3过渡动画 ...·  1 年前    · 
$conn=@mysql_connect('127.0.0.1','root','root','3306') or die("数据库连接失败,请联系管理员!"); mysql_query("set names 'utf8'"); $account="小柒"; $sql="SELECT * FROM `db_mir`.`user` WHERE `name`='$account' LIMIT 1"; $result=mysql_query($sql) or die(mysql_error());

结果成功输出错误信息,如下:

mysql_query($sql) or die(mysql_error())示例:<?php$conn=@mysql_connect('127.0.0.1','root','root','3306') or die("数据库连接失败,请联系管理员!");mysql_query("set names 'utf8'");$account="小柒";$sql="SELECT...