Jump to content
Fórum Script Brasil
  • 0

(Resolvido) Erro na hora de carregar sql no phpmyadmin


davidaguitar
 Share

Question

Aparece esse erro:

Erro

Comando SQL:

CREATE TABLE abuse(

id int( 11 ) NOT NULL AUTO_INCREMENT ,
siteid int( 11 ) default NULL ,
usrid int( 11 ) default NULL ,
text text,
datetimestamp( 14 ) NOT NULL ,
PRIMARY KEY ( id )

) ENGINE = MYISAM ;


 

Mensagens do MySQL : dot.gif

#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 '(14) NOT NULL,
  PRIMARY KEY  (id)
) ENGINE=MyISAM' at line 6

 

 

 

 

 

 

 

O arquivo é esse:

 

CREATE TABLE 7stat (
  usrid int(11) default NULL,
  date date default NULL,
  time time default '00:00:00',
  pg_views int(11) default '0',
  num float default NULL,
  received_pay char(3) default 'no'
) ENGINE=MyISAM;

CREATE TABLE 7statsite (
  siteid int(11) default NULL,
  date date default NULL,
  last_hit_time time default '00:00:00',
  num int(11) default NULL
) ENGINE=MyISAM;

CREATE TABLE abuse (
  id int(11) NOT NULL auto_increment,
  siteid int(11) default NULL,
  usrid int(11) default NULL,
  text text,
  date timestamp(14) NOT NULL,
  PRIMARY KEY  (id)
) ENGINE=MyISAM;

CREATE TABLE acctype (
  id int(11) NOT NULL auto_increment,
  name varchar(100) default NULL,
  descr text,
  ratemin float default '0',
  ratemax float default '0',
  cost float default '0',
  cashout float default '0',
  commissions float default '0',
  min_sites int(11) default '0',
  monthly_bonus float default '0',
  upg_time int(11) default '0',
  rpgebonus float default '0',
  rbonuses varchar(100) default NULL,
  levels varchar(100) default NULL,
  ptc_levels varchar(100) default NULL,
  PRIMARY KEY  (id)
) ENGINE=MyISAM;

INSERT INTO acctype VALUES (1, 'Free Member', 'Free account', '0.5', '0.8', '0', '15', '0.1', 10, '0', 0, 0.5, '100,50,30,20,10', '20,10,5,5,5', '20,10,5,5,5');
INSERT INTO acctype VALUES (2, 'Upgraded Member', '1:1 Upgraded Membership<br>\r\n1:1 Rateio de Surf!<br>Purchase 1 Upgrade Credit and automatically upgrade to 1:1 Upgraded Status!', '0.8', '1', '10', '10', '0.1', 100, '1000', 365, 1, '100,50,30,20,10', '30,20,10,5,5', '20,10,5,5,5');

CREATE TABLE ad_info (
  ad_id int(11) NOT NULL auto_increment,
  ad_name varchar(100) NOT NULL default '',
  type int(11) NOT NULL default '0',
  link_url text NOT NULL,
  banner_url text NOT NULL,
  h int(11) NOT NULL default '0',
  w int(11) NOT NULL default '0',
  alt varchar(100) NOT NULL default '',
  bottom_text varchar(100) NOT NULL default '',
  mouse_text varchar(100) NOT NULL default '',
  html text NOT NULL,
  num_allow_exp int(11) NOT NULL default '0',
  num_exp int(11) NOT NULL default '0',
  num_clicks int(11) NOT NULL default '0',
  prob int(11) NOT NULL default '0',
  win int(11) NOT NULL default '0',
  adv_user int(11) default '0',
  date varchar(10) NOT NULL default '',
  PRIMARY KEY  (ad_id)
) ENGINE=MyISAM;

CREATE TABLE admin (
  field varchar(20) default NULL,
  value varchar(255) default NULL
) ENGINE=MyISAM;

INSERT INTO admin VALUES ('login', 'admin');
INSERT INTO admin VALUES ('email', NULL);
INSERT INTO admin VALUES ('passwd', 'admin');
INSERT INTO admin VALUES ('lastaccess', '0');
INSERT INTO admin VALUES ('lastac', '0');
INSERT INTO admin VALUES ('lastacip', '0.0.0.0');
INSERT INTO admin VALUES ('lastip', '0.0.0.0');
INSERT INTO admin VALUES ('lstcrn', '0000-00-00');

CREATE TABLE adminprops (
  field varchar(6) default NULL,
  value float default '0'
) ENGINE=MyISAM;

INSERT INTO adminprops VALUES ('inibon', '1000');
INSERT INTO adminprops VALUES ('insbon', '1');
INSERT INTO adminprops VALUES ('reftim', '6');
INSERT INTO adminprops VALUES ('negact', '0');
INSERT INTO adminprops VALUES ('contex', '5');
INSERT INTO adminprops VALUES ('contey', '2');
INSERT INTO adminprops VALUES ('contcx', '6');
INSERT INTO adminprops VALUES ('contcy', '0.005');
INSERT INTO adminprops VALUES ('surplu', '0');
INSERT INTO adminprops VALUES ('csurpl', '0');
INSERT INTO adminprops VALUES ('sharec', '10');
INSERT INTO adminprops VALUES ('sharea', '1000');
INSERT INTO adminprops VALUES ('inact', '180');

CREATE TABLE banned_emails (
  id int(11) NOT NULL auto_increment,
  value varchar(255) default NULL,
  PRIMARY KEY  (id)
) ENGINE=MyISAM;

INSERT INTO banned_emails VALUES (1, '*@mail.com');

CREATE TABLE banned_ipadds (
  id int(11) NOT NULL auto_increment,
  value varchar(15) default NULL,
  PRIMARY KEY  (id)
) ENGINE=MyISAM;

CREATE TABLE banned_sites (
  id int(11) NOT NULL auto_increment,
  domain varchar(255) default NULL,
  type char(1) default NULL,
  PRIMARY KEY  (id)
) ENGINE=MyISAM;

CREATE TABLE banner (
  id int(11) NOT NULL auto_increment,
  imgurl varchar(255) default NULL,
  widtheight varchar(24) default NULL,
  PRIMARY KEY  (id)
) ENGINE=MyISAM;

CREATE TABLE cashout_history (
  id int(11) NOT NULL auto_increment,
  usrid int(11) default '0',
  amount float(10,2) default '0.00',
  descr varchar(100) default NULL,
  pay_merch varchar(50) default NULL,
  paid_to varchar(150) default NULL,
  cdate date default '0000-00-00',
  PRIMARY KEY  (id)
) ENGINE=MyISAM;

CREATE TABLE comission_history (
  id int(11) NOT NULL auto_increment,
  paid_to int(11) default '0',
  usrid int(11) default '0',
  wasfor varchar(100) default NULL,
  amount float(11,2) default '0.00',
  vdate date default '0000-00-00',
  PRIMARY KEY  (id)
) ENGINE=MyISAM;

CREATE TABLE faq (
  id int(11) NOT NULL auto_increment,
  quest text,
  answ text,
  PRIMARY KEY  (id)
) ENGINE=MyISAM;

CREATE TABLE gp_info (
  gp_id int(11) NOT NULL auto_increment,
  gid int(11) NOT NULL default '0',
  ad_id int(11) NOT NULL default '0',
  ad_prob int(11) NOT NULL default '0',
  PRIMARY KEY  (gp_id)
) ENGINE=MyISAM;

CREATE TABLE gp_name (
  id int(11) NOT NULL auto_increment,
  gp_name varchar(100) NOT NULL default '',
  PRIMARY KEY  (id)
) ENGINE=MyISAM;

CREATE TABLE html (
  type varchar(5) default NULL,
  content text
) ENGINE=MyISAM;

INSERT INTO html VALUES ('terms', 'Enter your site terms and conditions here');
INSERT INTO html VALUES ('priva', 'Enter your site privacy-policy here');
INSERT INTO html VALUES ('1page', 'Enter you program details here (signup bonuses, referral earnings etc.. etc..).');

CREATE TABLE investment_history (
  id int(11) NOT NULL auto_increment,
  usrid int(11) default '0',
  amount float(10,2) default '0.00',
  descr varchar(100) default NULL,
  is_from varchar(50) default '0',
  processor varchar(100) default NULL,
  adate date default '0000-00-00',
  expired char(3) default 'no',
  PRIMARY KEY  (id)
) ENGINE=MyISAM;

CREATE TABLE member_refs (
  mem_id int(11) NOT NULL default '0',
  ref_id int(11) NOT NULL default '0',
  UNIQUE KEY uniqueness (mem_id,ref_id),
  KEY usersid (mem_id),
  KEY upline (ref_id)
) ENGINE=MyISAM;

CREATE TABLE merchant_codes (
  id int(11) NOT NULL auto_increment,
  name varchar(100) default NULL,
  code text,
  PRIMARY KEY  (id)
) ENGINE=MyISAM;

INSERT INTO merchant_codes VALUES (1, 'PayPal', 'Code here');
INSERT INTO merchant_codes VALUES (2, 'E-Gold', 'E-Gold Code');
INSERT INTO merchant_codes VALUES (3, 'StormPay', 'Code with Substitutions here [user] [cost] etc...');

CREATE TABLE monthly_stats (
  id int(11) NOT NULL auto_increment,
  usrid int(11) default '0',
  days_paid_roi int(11) default '0',
  past_earnings float(10,5) default '0.00000',
  roi_earned float(10,4) default '0.0000',
  coms_earned float(10,4) default '0.0000',
  sbcash_earned float(10,5) default '0.00000',
  ptc_cash_e float(10,4) default '0.0000',
  refptc_cash float(10,4) default '0.0000',
  misc_earned float(10,4) default '0.0000',
  tot_owed float(10,5) default '0.00000',
  paid_out float(10,3) default '0.000',
  monthis int(2) default '0',
  yearis int(4) default '0',
  this_month date default '0000-00-00',
  month_transfer char(3) default 'no',
  earn_pay char(3) default 'no',
  paidout char(3) default 'no',
  finalized char(3) default 'no',
  PRIMARY KEY  (id)
) ENGINE=MyISAM;

CREATE TABLE other_history (
  id int(11) NOT NULL auto_increment,
  usrid int(11) default '0',
  amount float(10,2) default '0.00',
  descr varchar(100) default NULL,
  is_from varchar(50) default '0',
  adate date default '0000-00-00',
  PRIMARY KEY  (id)
) ENGINE=MyISAM;

CREATE TABLE ptc_orders (
  ptcid int(11) NOT NULL auto_increment,
  type enum('banner','text') NOT NULL default 'banner',
  type2 enum('cash','credit') NOT NULL default 'cash',
  userid int(11) default NULL,
  linkid varchar(25) default NULL,
  banurl varchar(200) default NULL,
  linkurl text NOT NULL,
  linktxt text,
  clicks_remain int(11) NOT NULL default '0',
  amt_sent int(11) NOT NULL default '0',
  date_sent date default '0000-00-00',
  date_done date default '0000-00-00',
  cash_click float default '0',
  credit_click float default '0',
  adtimer int(5) NOT NULL default '0',
  day_lock int(5) NOT NULL default '0',
  PRIMARY KEY  (ptcid)
) ENGINE=MyISAM;

CREATE TABLE ptc_tracking (
  userid int(11) default NULL,
  banlinkid varchar(25) default NULL,
  cdate date default NULL
) ENGINE=MyISAM;

CREATE TABLE referstats (
  id int(11) NOT NULL auto_increment,
  usrid int(11) default '0',
  orgip varchar(15) default NULL,
  refip varchar(15) default NULL,
  httpref varchar(255) default NULL,
  browser varchar(255) default NULL,
  cdate date default NULL,
  ctime time default NULL,
  PRIMARY KEY  (id)
) ENGINE=MyISAM;

CREATE TABLE sellcredit (
  id int(11) NOT NULL auto_increment,
  name varchar(255) default NULL,
  descr text,
  cost float default '0',
  PRIMARY KEY  (id)
) ENGINE=MyISAM;

INSERT INTO sellcredit VALUES (1, '1000 Site Credits', '1000 Site Credits', '5');

CREATE TABLE site (
  id int(11) NOT NULL auto_increment,
  usrid int(11) default NULL,
  name varchar(255) default NULL,
  url varchar(255) default NULL,
  lang varchar(30) default NULL,
  state varchar(30) default NULL,
  credits float default '0',
  totalhits int(11) default '0',
  hitslastmail int(11) default '0',
  hour varchar(13) default '0',
  cph int(11) default '0',
  cth int(11) default '0',
  PRIMARY KEY  (id)
) ENGINE=MyISAM;

CREATE TABLE tads (
  id int(11) NOT NULL auto_increment,
  text text,
  PRIMARY KEY  (id)
) ENGINE=MyISAM;

CREATE TABLE user (
  id int(11) NOT NULL auto_increment,
  name varchar(100) default NULL,
  email varchar(100) default NULL,
  passwd varchar(20) default NULL,
  pay_to int(11) default '0',
  payout_address varchar(150) default NULL,
  ref int(11) default '0',
  invested float(10,2) default '0.00',
  acctype int(11) default NULL,
  credits float default '0',
  roi_cash float(10,4) default '0.0000',
  cshfrmallrefs float(10,5) default '0.00000',
  lifetime_cash float(10,3) default '0.000',
  lifetime_paid float(10,2) default '0.00',
  lifetot_roi float(10,5) default '0.00000',
  joindate datetime default NULL,
  lastmail date default '0000-00-00',
  minmax int(11) default NULL,
  crdsfrmallrefs float default '0',
  rbon_credits float default '0',
  rpage_credits float default '0',
  lifetime_credits float default '0',
  lifetime_pages int(11) default '0',
  sb_credits float default '0',
  sb_cash float(10,5) default '0.00000',
  ptc_clicks int(11) default '0',
  ptc_crds float default '0',
  ptc_cash float default '0',
  lastroi date default '0000-00-00',
  lastaccess datetime default NULL,
  lastsurfed datetime default '0000-00-00 00:00:00',
  upgrade_ends date default NULL,
  premregdate date default '0000-00-00',
  premmp int(11) default '0',
  toref float default '0',
  cshtoref float(10,5) default '0.00000',
  commstoref float(10,4) default '0.0000',
  allow_contact char(3) default 'yes',
  status varchar(20) default NULL,
  ip_address varchar(15) default NULL,
  ac int(11) default '0',
  PRIMARY KEY  (id),
  UNIQUE KEY email (email)
) ENGINE=MyISAM;

 

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Text e date são palavras reservadas do MySQL. Se você quer utilizá-las como nomes de campos em suas tabelas elas devem estar entre crases.

Assim: 

 `text` text,
 `date` timestamp(14) NOT NULL,

Não é aspas simples. É CRASE. 

Link to comment
Share on other sites

  • 0

Aqui passou. Criei um banco de testes, carreguei suas tabelas e não obtive mensagem de erro.

Qual erro está aparecendo para você?

o mesmo erro acima após a mudança. Estou usando:

Servidor web

  • cpsrvd 11.50.0.23
  • Versão do cliente de base de dados: libmysql - 5.1.73
  • Extensão de PHP: mysqli Documentação

phpMyAdmin

Informação de Versão: 4.0.10.7

Link to comment
Share on other sites

  • 0

Tente carregar uma tabela por vez.

Consegui eu apaguei o (14) deixando sem numero e as tabelas foram criadas.

CREATE TABLE abuse (
  id int(11) NOT NULL auto_increment,
  siteid int(11) default NULL,
  usrid int(11) default NULL,
  text text,
  date timestamp NOT NULL,
  PRIMARY KEY  (id)
) ENGINE=MyISAM;

Obrigado :D

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Forum Statistics

    • Total Topics
      149.6k
    • Total Posts
      646.2k
×
×
  • Create New...