<?php $link = mysql_connect("localhost", "root", "3435945") or die("***" . mysql_error()); echo "成功接连到服务器"; if (mysql_select_db(base2, $link)) echo "选择到base2数据库教程"; $sql = "create table t1(id int(5) not null primary key,name varchar(12) not null)"; //开源代码phprm.com if (mysql_query($sql, $link)) echo "表T1创建成功"; echo " "; echo "当前base2数据库上的表有:"; echo " "; $table_list = mysql_query("show tables", $link); while ($row = mysql_fetch_row($table_list)) { echo $row[0]; echo " "; }
永久链接:
转载随意!带上文章地址吧。