一个PHP建表程序
下面这个程序我找了几个小时的错,就是不知道错在哪儿,请高手指点!!!谢谢!!!
<?php
require "../dbsql.inc";
$db = new DBSQL($DBName);
$sql = "create table point";
$sql.="(examNO int not null primary key,";
$sql.="userID int not null,";
$sql.="examTime int not null,";
$sql.="point int not null,";
$sql.="show int not null default 1)";
$result = mysql_query($sql);
echo "$sql \n";
if($result) echo "OK!!!";
else echo "NO!!!";
?>
------
回复此文章 |
'show' 是Mysql的关键词(如 show tables,show databases),不能用作字段名称,改为‘showID'之类即可。
回复此文章 |
OK 了!!
<?php
require "../dbsql.inc";
$db = new DBSQL($DBName);
$sql = "create table point";
$sql.="(examNO int not null primary key,";
$sql.="userID int not null,";
$sql.="examTime int not null,";
$sql.="point int not null,";
$sql.="show int not null default 1)";
$result = mysql_query($sql);
echo "$sql \n";
if($result) echo "OK!!!";
else echo "NO!!!";
?>
------
回复此文章 |
'show' 是Mysql的关键词(如 show tables,show databases),不能用作字段名称,改为‘showID'之类即可。
回复此文章 |
OK 了!!
hofman
2005-11-19 22:48:30
评论:0
阅读:630
引用:0
