当前位置:Gxlcms > PHP教程 > 脚本-急求各位大神的指导~~~

脚本-急求各位大神的指导~~~

时间:2021-07-01 10:21:17 帮助过:2人阅读

脚本selectphp数据库dos

$link = mysql_connect('localhost','root','')or die('连接失败'.mysql_error().mysql_errno()); mysql_query('create database if not exists an;');mysql_select_db('an');mysql_query('create table anweisong(id int ,name char(55));');$result = mysql_query('insert into anweisong(id,name) values('3','xxx');'); if($result and mysql_affected_rows()>0){     echo 'insert success!'; }else{     echo 'fail!!'; } 各位大神啊~~我在dos窗口中可以正常的添加表anweisong的内容,但是在php脚本文件中,为什么这个mysql_query()命令就没用呢?失效啊,求各位大哥指点下!

人气教程排行