내가

2012-10-09 1 views
-3
  • 서버 MySQL의 구문에 오류가 점점 계속 : 5.5.23-55
  • 프로토콜 버전 : 10
  • MySQL의 문자셋 : UTF-8 유니 코드 (UTF8 로컬 호스트 UNIX 소켓
  • Server 버전을 통해)
  • cpsrvd 11.32.4.13
  • MySQL 클라이언트 버전 : 5.5.23

안녕, 나는 getti을 유지 ng MySql 오류. 여기에 오류 :내가

# 

CREATE TABLE {prefix}_ads (
    aid int(10) unsigned NOT NULL auto_increment, 
    type enum('image','rich') NOT NULL default 'image', 
    did int(10) unsigned NOT NULL default '0', 
    active enum('yes','no') NOT NULL default 'yes', 
    datetime datetime NOT NULL default '0000-00-00 00:00:00', 
    PRIMARY KEY (aid) 
) TYPE=MyISAM; 
# -------------------------------------------------------- 

# 
# Table structure for table `pla_images` 
# 

CREATE TABLE {prefix}_images (
    did int(10) unsigned NOT NULL auto_increment, 
    image_url varchar(255) NOT NULL default '', 
    url varchar(255) NOT NULL default '', 
    alt_text varchar(150) NOT NULL default '', 
    target varchar(20) NOT NULL default '', 
    width int(11) NOT NULL default '0', 
    height int(11) NOT NULL default '0', 
    PRIMARY KEY (did) 
) TYPE=MyISAM; 
# -------------------------------------------------------- 

# 
# Table structure for table `pla_impressions` 
# 

CREATE TABLE {prefix}_impressions (
    aid int(10) unsigned NOT NULL default '0', 
    impdate date NOT NULL default '0000-00-00', 
    displays bigint(20) unsigned NOT NULL default '0', 
    clicks int(11) NOT NULL default '0', 
    PRIMARY KEY (aid,impdate) 
) TYPE=MyISAM; 
# -------------------------------------------------------- 

# 
# Table structure for table `pla_richtext` 
# 

CREATE TABLE {prefix}_richtext (
    did int(10) unsigned NOT NULL auto_increment, 
    data mediumtext NOT NULL, 
    PRIMARY KEY (did) 
) TYPE=MyISAM; 

내가 엔진으로 변경 TYPE을했지만 여전히 오류를보고 ...

도와주세요 :

여기
Error 

SQL query: 

# LedAds 2.x SQL Def file 
# http://www.ledscripts.com/ 
# Do NOT try to dump this straight in 
# If you must do dump this in yourself, then replace all of the 
# {prefix} with whatever prefix you decided on when configuring everything 
# Host: localhost 
# Generation Time: Feb 11, 2002 at 08:32 PM 
# Server version: 3.23.42 
# Database : `pla` 
# -------------------------------------------------------- 
# 
# Table structure for table `pla_ads` 
# 
CREATETABLE {prefix}_ads(

aid int(10)unsigned NOTNULLAUTO_INCREMENT , 
TYPE enum('image','rich')NOTNULL default'image', 
did int(10)unsigned NOTNULL default'0', 
active enum('yes','no')NOTNULL default'yes', 
datetime datetime NOTNULL default'0000-00-00 00:00:00', 
PRIMARYKEY (aid) 
) TYPE=MYISAM ; 



MySQL said: 
#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 '{prefix}_ads (
    aid int(10) unsigned NOT NULL auto_increment, 
    type enum('im' at line 18 

내 코드입니다!

+0

이 쿼리를 그대로 실행하려고합니까, 즉 {접두사}가 실제 접두사로 바뀌 었습니까? 나는 당신이 어떤 무대에서 그것을 실제 접두어로 대체하려고한다고 생각한다. –

+0

답변은 스크립트 상단의 댓글 섹션에 있습니다. –

+0

# 자신을 덤프해야하는 경우 # {prefix}를 모두 바꿀 때 미리 정한 접두사로 바꾸십시오. – Jocelyn

답변

1

이 SQL 스크립트가 유효한 접 두부 이름 한마디로

{prefix}을 변경하는 PHP 스크립트에 의해 runned해야합니다 {prefix}이 유효하지 않습니다, 그것은 {}

+0

고마워! 지금 나는 또 다른 문제가있다 : 치명적인 오류 : /home/mu/public_html/ledads/common.inc.php(168)의 객체 컨텍스트에 없을 때 $ this를 사용한다 : 2 행의 런타임 작성 함수 (function2) – user1695573

+0

그것은 또 다른 것이다. 또 다른 문제, 또 다른 질문. 그들이이 문제를 해결하고 다른 질문을하면 대답 중 하나를 받아 들일 것을 고려하십시오. –

+0

나는 받아들이는 방법을 알고 싶습니다. 방법? – user1695573

0

귀하의 {접두사없이 접두사해야한다 }가 정의되지 않았기 때문에 MySQL은 그 값이 무엇인지 모릅니다.

테스트 목적으로 "{prefix}"의 모든 항목을 "my_prefix"로 바꿔야합니다.

+0

지금 작업하고 있어요 .. 내가 읽으면 도움이 될 것입니다 .. : ( – user1695573

1

# Do NOT try to dump this straight in

# If you must do dump this in yourself, then replace all of the

# {prefix} with whatever prefix you decided on when configuring everything

+0

감사합니다. 작동 중입니다. 이제 다른 문제가 있습니다. – user1695573