欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

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

程序员文章站 2022-05-31 12:07:56
...
脚本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()命令就没用呢?失效啊,求各位大哥指点下!