PHP建表请教错误
<?php
$host="localhost";
$user="admin";
$password="abcde";
$db_name="info";
$table_name="User";
$conn=mysql_connect($host,$user,$password);
if(!$conn)
{
die ("".mysql_error());
}
else
{
echo "mysql host:$host,mysql user:$user<br>";
}
mysql_select_db($db_name,$conn) or
die("select db error".mysql_error());
echo "db:$db_name table:$table_name<br>";
mysql_query("SET NAME'GB2312'");
$mysql_command="create table".$table_name."(name varchar(16),password(16))";
$result=mysql_query($mysql_command) or
die("create table error".mysql_error());
echo "create table successed:$table_name";
?>
运行后,建表错误,可是看了半天也没发现语法哪错了,请教!!!
mysql host:localhost,mysql user:admin
db:info table:User
create table errorYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'tableUserInfo(name varchar(16),password(16))' at line 1