下面是建表的示例:
<html>
<?
include 'fileDB.inc';
?>
<head>
<title>
Win06
</title>
<style>
a {text-decoration:none; color:#680068;font-size:9pt;}
body {font-size:10pt;}
</style>
</head>
<body>
<?
$database="test";
$table="students";
$user="leeo";
$pw="ttg5zz";
$d=new fileDB;
$d->login($user,$pw);
$d->connectDB($database);
$t[0]="学号";
$t[1]="姓名";
$t[2]="性别";
$t[3]="年龄";
$ts[0]=3;
$ts[1]=16;
$ts[2]=2;
$ts[3]=2;
$d->createTable($table,$t,$ts);
?>
</body>
</html>

解决方案 »

  1.   

    下面是插入元组的示例:
    <html>
    <?
    include 'fileDB.inc';
    ?>
    <head>
    <title>
    Win01
    </title>
    <style>
    a {text-decoration:none; color:#680068;font-size:9pt;}
    body {font-size:10pt;}
    </style>
    </head>
    <body>
    <?
    $database="test";
    $table="students";
    $user="leeo";
    $pw="ttg5zz";
    $d=new fileDB;
    $d->login($user,$pw);
    $d->connectDB($database);
    $d->connectTable($table);$t[0][0]="006";
    $t[0][1]="令狐冲";
    $t[0][2]="男";
    $t[0][3]="21";
    $t[1][0]="007";
    $t[1][1]="岳灵珊";
    $t[1][2]="女";
    $t[1][3]="16";
    $t[2][0]="008";
    $t[2][1]="岳不群";
    $t[2][2]="男";
    $t[2][3]="40";
    $t[3][0]="009";
    $t[3][1]="宁中则";
    $t[3][2]="女";
    $t[3][3]="30";
    $t[4][0]="010";
    $t[4][1]="项问天";
    $t[4][2]="男";
    $t[4][3]="35";
    $t[5][0]="011";
    $t[5][1]="任我行";
    $t[5][2]="男";
    $t[5][3]="40";
    $t[6][0]="012";
    $t[6][1]="任莹莹";
    $t[6][2]="女";
    $t[6][3]="19";
    $t[7][0]="013";
    $t[7][1]="路猴儿";
    $t[7][2]="男";
    $t[7][3]="17";
    $t[8][0]="014";
    $t[8][1]="莫大";
    $t[8][2]="男";
    $t[8][3]="50";
    $d->insertTable($t);
    ?>
    </body>
    </html>
      

  2.   

    由于篇幅的关系,其他的不再给出,有任何问题可以给我留言。或者发到信箱
    [email protected]