오류가 때 MySQL은 말했다 테이블# 1064 오류 메시지
을 만들려면 : 당신이 phpadmin에서 위의 코드를 실행하려고하는 것처럼
1064 - You have an error in your SQL syntax; check the manual that corresponds
to your MySQL server version for the right syntax to use near
'mysql_query("CREATE TABLE " . DB_TABLE_PREFIX . "mssgs (
id mediumint(5) unsig' at line 1
mysql_query("CREATE TABLE " . DB_TABLE_PREFIX . "mssgs (
id mediumint(5) unsigned NOT NULL auto_increment,
uid tinyint(3) unsigned NOT NULL default '0',
m tinyint(2) NOT NULL default '0',
d tinyint(2) NOT NULL default '0',
y smallint(4) NOT NULL default '0',
start_time time NOT NULL default '00:00:00',
end_time time NOT NULL default '00:00:00',
title varchar(50) NOT NULL default '',
text text NOT NULL,
PRIMARY KEY (id)
) TYPE=MyISAM") or die(mysql_error());
mysql_query("create index m on " . DB_TABLE_PREFIX . "mssgs (m)");
mysql_query("create index y on " . DB_TABLE_PREFIX . "mssgs (y)");
mysql_query("CREATE TABLE " . DB_TABLE_PREFIX . "users (
uid smallint(6) NOT NULL auto_increment,
username char(15) NOT NULL default '',
password char(32) NOT NULL default '',
fname char(20) NOT NULL default '',
lname char(30) NOT NULL default '0',
userlevel tinyint(2) NOT NULL default '0',
email char(40) default NULL,
PRIMARY KEY (uid)
) TYPE=MyISAM") or die(mysql_error());
mysql_query("INSERT INTO " . DB_TABLE_PREFIX . "users
(username, password, fname, lname, userlevel, email) VALUES (
'admin', 'password', 'default', 'user', 2, '');
")
이러한 모든 SQL 명령을 MySQL (phpmyadmin)에서 별도로 실행하려고 했습니까? – Lion
@Lion : 오류가 mysql_query ('sql.SQL의 일부가 아닌 근처의 구문 오류라고하기 때문에 –