Forum Archive-Host

Vous n'êtes pas identifié.

#1 25-05-2014 12:16:53

ragnart
Membre
Lieu: Pas-De-Calais - FRANCE
Date d'inscription: 26-01-2014
Messages: 24
Site web

message d'erreur phpmyadmin

Bonjour,

j'essai d'importer manuellement un script sql avec myadmin dans une base de données nouvellement créé et j'ai ce type d'erreur :

MySQL a répondu:

#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 '<?php

$sqls[$t_adpics] = "CREATE TABLE `$t_adpics` (
  `picid` int unsigned ' at line 1

est-ce un problème de version sql non compatible avec la version 5.3 native actuellement installé , Merci pour l'aide

voici le code en son entier :

<?php

$sqls[$t_adpics] = "CREATE TABLE `$t_adpics` (
  `picid` int unsigned NOT NULL auto_increment,
  `picfile` varchar(50) NOT NULL default '',
  `adid` int unsigned NOT NULL default '0',
  `isevent` enum('0','1') NOT NULL default '0',
  `timestamp` timestamp(14) NOT NULL,
  PRIMARY KEY  (`picid`),
  KEY `adid` (`adid`,`isevent`)
) TYPE=MyISAM;";



$sqls[$t_ads] = "CREATE TABLE `$t_ads` (
  `adid` int unsigned NOT NULL auto_increment,
  `adtitle` varchar(100) NOT NULL default '',
  `addesc` longtext NOT NULL,
  `area` varchar(50) NOT NULL default '',
  `email` varchar(50) NOT NULL default '',
  `showemail` enum('0','1','2') NOT NULL default '0',
  `password` varchar(50) NOT NULL default '',
  `code` varchar(35) NOT NULL default '',
  `cityid` smallint unsigned NOT NULL default '0',
  `subcatid` smallint unsigned NOT NULL default '0',
  `price` DECIMAL( 10, 2 ) NOT NULL default '0',
  `othercontactok` enum('0','1') NOT NULL default '0',
  `hits` int unsigned NOT NULL default '0',
  `ip` varchar(15) NOT NULL default '',
  `verified` enum('0','1') NOT NULL default '0',
  `abused` int unsigned NOT NULL default '0',
  `enabled` enum('0','1') NOT NULL default '0',
  `createdon` datetime NOT NULL default '0000-00-00 00:00:00',
  `expireson` datetime NOT NULL default '0000-00-00 00:00:00',
  `timestamp` timestamp(14) NOT NULL,
  PRIMARY KEY  (`adid`),
  KEY `subcatid` (`subcatid`),
  KEY `cityid` (`cityid`),
  KEY `verified` (`verified`),
  KEY `enabled` (`enabled`)
) TYPE=MyISAM;";


$sqls[$t_adxfields] = "CREATE TABLE `$t_adxfields` (
  `adid` int unsigned NOT NULL default '0',
  `f1` varchar(255) NOT NULL default '',
  `f2` varchar(255) NOT NULL default '',
  `f3` varchar(255) NOT NULL default '',
  `f4` varchar(255) NOT NULL default '',
  `f5` varchar(255) NOT NULL default '',
  `f6` varchar(255) NOT NULL default '',
  `f7` varchar(255) NOT NULL default '',
  `f8` varchar(255) NOT NULL default '',
  `f9` varchar(255) NOT NULL default '',
  `f10` varchar(255) NOT NULL default '',
  `f11` varchar(255) NOT NULL default '',
  `f12` varchar(255) NOT NULL default '',
  `f13` varchar(255) NOT NULL default '',
  `f14` varchar(255) NOT NULL default '',
  `f15` varchar(255) NOT NULL default '',
  KEY `adid` (`adid`)
) TYPE=MyISAM;";


$sqls[$t_areas] = "CREATE TABLE `$t_areas` (
  `areaid` smallint unsigned NOT NULL auto_increment,
  `areaname` varchar(50) NOT NULL default '',
  `cityid` smallint unsigned NOT NULL default '0',
  `pos` smallint unsigned NOT NULL default '0',
  `enabled` enum('0','1') NOT NULL default '0',
  `timestamp` timestamp(14) NOT NULL,
  PRIMARY KEY  (`areaid`),
  KEY `pos` (`pos`),
  KEY `cityid` (`cityid`),
  KEY `enabled` (`enabled`)
) TYPE=MyISAM;";


$sqls[$t_cats] = "CREATE TABLE `$t_cats` (
  `catid` smallint unsigned NOT NULL auto_increment,
  `catname` varchar(50) NOT NULL default '',
  `pos` smallint unsigned NOT NULL default '0',
  `enabled` enum('0','1') NOT NULL default '0',
  `alert` enum('0','1') NOT NULL default '0',
  `alerttitle` VARCHAR(50) NOT NULL default '',
  `alertdesc` VARCHAR(255) NOT NULL default '',
  `timestamp` timestamp(14) NOT NULL,
  PRIMARY KEY  (`catid`),
  KEY `enabled` (`enabled`)
) TYPE=MyISAM;";



$sqls[$t_cities] = "CREATE TABLE `$t_cities` (
  `cityid` smallint unsigned NOT NULL auto_increment,
  `cityname` varchar(50) NOT NULL default '',
  `countryid` smallint unsigned NOT NULL default '0',
  `pos` smallint unsigned NOT NULL default '0',
  `enabled` enum('0','1') NOT NULL default '0',
  `timestamp` timestamp(14) NOT NULL,
  PRIMARY KEY  (`cityid`),
  KEY `countryid` (`countryid`),
  KEY `pos` (`pos`),
  KEY `enabled` (`enabled`)
) TYPE=MyISAM;";


$sqls[$t_countries] = "CREATE TABLE `$t_countries` (
  `countryid` smallint unsigned NOT NULL auto_increment,
  `countryname` varchar(50) NOT NULL default '',
  `filtre` varchar(255) NOT NULL,
  `enabled` enum('0','1') NOT NULL default '0',
  `pos` smallint unsigned NOT NULL default '0',
  `timestamp` timestamp(14) NOT NULL,
  PRIMARY KEY  (`countryid`),
  KEY `pos` (`pos`),
  KEY `enabled` (`enabled`)
) TYPE=MyISAM;";


$sqls[$t_events] = "CREATE TABLE `$t_events` (
  `adid` int unsigned NOT NULL auto_increment,
  `adtitle` varchar(100) NOT NULL default '',
  `addesc` longtext NOT NULL,
  `area` varchar(50) NOT NULL default '',
  `email` varchar(50) NOT NULL default '',
  `showemail` enum('0','1','2') NOT NULL default '0',
  `password` varchar(50) NOT NULL default '',
  `code` varchar(35) NOT NULL default '',
  `cityid` smallint unsigned NOT NULL default '0',
  `starton` date NOT NULL default '0000-00-00',
  `endon` date NOT NULL default '0000-00-00',
  `othercontactok` enum('0','1') NOT NULL default '0',
  `hits` int unsigned NOT NULL default '0',
  `ip` varchar(15) NOT NULL default '',
  `verified` enum('0','1') NOT NULL default '0',
  `abused` int unsigned NOT NULL default '0',
  `enabled` enum('0','1') NOT NULL default '0',
  `createdon` datetime NOT NULL default '0000-00-00 00:00:00',
  `expireson` datetime NOT NULL default '0000-00-00 00:00:00',
  `timestamp` timestamp(14) NOT NULL,
  PRIMARY KEY  (`adid`),
  KEY `cityid` (`cityid`),
  KEY `verified` (`verified`),
  KEY `enabled` (`enabled`)
) TYPE=MyISAM;";


$sqls[$t_featured] = "CREATE TABLE `$t_featured` (
  `featadid` int unsigned NOT NULL auto_increment,
  `adid` int unsigned NOT NULL default '0',
  `adtype` char(1) NOT NULL default '',
  `featuredtill` datetime NOT NULL default '0000-00-00 00:00:00',
  `timestamp` timestamp(14) NOT NULL,
  PRIMARY KEY  (`featadid`),
  UNIQUE KEY `adid` (`adid`,`adtype`)
) TYPE=MyISAM;";


$sqls[$t_imgcomments] = "CREATE TABLE `$t_imgcomments` (
  `commentid` int unsigned NOT NULL auto_increment,
  `imgid` int unsigned NOT NULL default '0',
  `postername` varchar(100) NOT NULL default '',
  `comment` text NOT NULL,
  `timestamp` timestamp(14) NOT NULL,
  PRIMARY KEY  (`commentid`),
  KEY `imgid` (`imgid`)
) TYPE=MyISAM;";


$sqls[$t_imgs] = "CREATE TABLE `$t_imgs` (
  `imgid` int unsigned NOT NULL auto_increment,
  `imgtitle` varchar(255) NOT NULL default '',
  `imgfilename` varchar(50) NOT NULL default '',
  `imgdesc` text NOT NULL,
  `postername` varchar(100) NOT NULL default '',
  `posteremail` varchar(100) NOT NULL default '',
  `showemail` enum('0','1','2') NOT NULL default '0',
  `password` varchar(100) NOT NULL default '',
  `code` varchar(35) NOT NULL default '',
  `cityid` smallint unsigned NOT NULL default '0',
  `ip` varchar(15) NOT NULL default '',
  `verified` enum('0','1') NOT NULL default '0',
  `enabled` enum('0','1') NOT NULL default '0',
  `createdon` datetime NOT NULL default '0000-00-00 00:00:00',
  `expireson` datetime NOT NULL default '0000-00-00 00:00:00',
  `timestamp` timestamp(14) NOT NULL,
  PRIMARY KEY  (`imgid`),
  KEY `verified` (`verified`),
  KEY `enabled` (`enabled`),
  KEY `cityid` (`cityid`)
) TYPE=MyISAM;";


$sqls[$t_ipblock] = "CREATE TABLE `$t_ipblock` (
  `ipid` int(11) NOT NULL auto_increment,
  `ip` varchar(15) NOT NULL default '',
  `ipstart` bigint(20) NOT NULL default '0',
  `ipend` bigint(20) NOT NULL default '0',
  `blocks` int(11) NOT NULL default '0',
  `timestamp` timestamp NOT NULL,
  PRIMARY KEY  (`ipid`),
  KEY `ipstart` (`ipstart`,`ipend`)
) TYPE=MyISAM;";


$sqls[$t_ipns] = "CREATE TABLE `$t_ipns` (
  `ipnid` int unsigned NOT NULL auto_increment,
  `txnid` varchar(50) NOT NULL default '',
  `result` varchar(50) NOT NULL default '',
  `itemname` varchar(50) NOT NULL default '',
  `itemnumber` varchar(25) NOT NULL default '',
  `amount` decimal(5,2) NOT NULL default '0',
  `currency` varchar(10) NOT NULL default '',
  `payeremail` varchar(50) NOT NULL default '',
  `receiveremail` varchar(50) NOT NULL default '',
  `paymenttype` varchar(25) NOT NULL default '',
  `verified` varchar(25) NOT NULL default '',
  `status` varchar(25) NOT NULL default '',
  `pendingreason` varchar(25) NOT NULL default '',
  `fullipn` text NOT NULL,
  `receivedat` datetime NOT NULL default '0000-00-00 00:00:00',
  `timestamp` timestamp(14) NOT NULL,
  PRIMARY KEY  (`ipnid`)
) TYPE=MyISAM;";

$sqls[$t_online] = "CREATE TABLE `$t_online` (
  `ip` varchar(15) NOT NULL,
  `time` bigint(16) NOT NULL DEFAULT '0'
) TYPE=MyISAM;";


$sqls[$t_options_extended] = "CREATE TABLE `$t_options_extended` (
  `eoptid` smallint unsigned NOT NULL auto_increment,
  `days` smallint unsigned NOT NULL default '0',
  `price` decimal(5,2) NOT NULL default '0.00',
  PRIMARY KEY  (`eoptid`)
) TYPE=MyISAM;";


$sqls[$t_options_featured] = "CREATE TABLE `$t_options_featured` (
  `foptid` tinyint unsigned NOT NULL auto_increment,
  `days` smallint unsigned NOT NULL default '0',
  `price` decimal(5,2) NOT NULL default '0.00',
  PRIMARY KEY  (`foptid`)
) TYPE=MyISAM;";


$sqls[$t_payments] = "CREATE TABLE `$t_payments` (
  `paymentid` int unsigned NOT NULL auto_increment,
  `txnid` varchar(50) NOT NULL default '',
  `adid` int unsigned NOT NULL default '0',
  `adtype` char(1) NOT NULL default '',
  `itemname` varchar(50) NOT NULL default '',
  `itemnumber` varchar(25) NOT NULL default '',
  `amount` decimal(5,2) NOT NULL default '0',
  `currency` varchar(10) NOT NULL default '',
  `payeremail` varchar(50) NOT NULL default '',
  `paymenttype` varchar(25) NOT NULL default '',
  `verified` varchar(25) NOT NULL default '',
  `status` varchar(25) NOT NULL default '',
  `pendingreason` varchar(25) NOT NULL default '',
  `fullipn` text NOT NULL,
  `receivedat` datetime NOT NULL default '0000-00-00 00:00:00',
  `timestamp` timestamp(14) NOT NULL,
  PRIMARY KEY  (`paymentid`),
  UNIQUE KEY `txnid` (`txnid`),
  KEY `adid` (`adid`),
  KEY `adtype` (`adtype`)
) TYPE=MyISAM;";


$sqls[$t_promos_extended] = "CREATE TABLE `$t_promos_extended` (
  `epromoid` int unsigned NOT NULL auto_increment,
  `adid` int unsigned NOT NULL default '0',
  `adtype` char(1) NOT NULL default '',
  `days` smallint unsigned NOT NULL default '0',
  `amountpaid` decimal(5,2) NOT NULL default '0',
  `paymentid` int unsigned NOT NULL default '0',
  `timestamp` timestamp(14) NOT NULL,
  PRIMARY KEY  (`epromoid`),
  KEY `adid` (`adid`),
  KEY `adtype` (`adtype`),
  KEY `paymentid` (`paymentid`)
) TYPE=MyISAM;";



$sqls[$t_promos_featured] = "CREATE TABLE `$t_promos_featured` (
  `fpromoid` int unsigned NOT NULL auto_increment,
  `adid` int unsigned NOT NULL default '0',
  `adtype` char(1) NOT NULL default '',
  `days` smallint unsigned NOT NULL default '0',
  `amountpaid` decimal(5,2) NOT NULL default '0',
  `paymentid` int unsigned NOT NULL default '0',
  `timestamp` timestamp(14) NOT NULL,
  PRIMARY KEY  (`fpromoid`),
  KEY `adid` (`adid`),
  KEY `adtype` (`adtype`),
  KEY `paymentid` (`paymentid`)
) TYPE=MyISAM;";


$sqls[$t_subcats] = "CREATE TABLE `$t_subcats` (
  `subcatid` smallint unsigned NOT NULL auto_increment,
  `subcatname` varchar(50) NOT NULL default '',
  `catid` smallint unsigned NOT NULL default '0',
  `hasprice` enum('0','1') NOT NULL default '0',
  `pricelabel` varchar(25) NOT NULL default '',
  `expireafter` smallint unsigned NOT NULL default '100',
  `enabled` enum('0','1') NOT NULL default '0',
  `pos` smallint unsigned NOT NULL default '0',
  `timestamp` timestamp(14) NOT NULL,
  PRIMARY KEY  (`subcatid`),
  KEY `catid` (`catid`)
) TYPE=MyISAM;";


$sqls[$t_subcatxfields] = "CREATE TABLE `$t_subcatxfields` (
  `subcatid` smallint unsigned NOT NULL default '0',
  `fieldnum` tinyint unsigned NOT NULL default '0',
  `name` varchar(50) NOT NULL default '',
  `type` enum('N','S','D','U','E') NOT NULL default 'S',
  `vals` varchar(255) NOT NULL default '',
  `required` enum('0','1') NOT NULL default '0',
  `showinlist` enum('0','1') NOT NULL default '1',
  `searchable` enum('0','1') NOT NULL default '0',
  `timestamp` timestamp(14) NOT NULL,
  PRIMARY KEY  (`subcatid`,`fieldnum`)
) TYPE=MyISAM;";

?>


Pour recevoir, il faut savoir partager !

Hors ligne

 

#2 25-05-2014 19:12:52

Cristal
Administrateur
Lieu: Dijon
Date d'inscription: 24-09-2006
Messages: 5072
Site web

Re: message d'erreur phpmyadmin

Bonjour,

Vous voulez mettre du code PHP dans un serveur de bases de données qui ne comprend que le SQL, il est normal que cela ne marche pas.


Cristal
Directeur d'Archive-Host

État du Reseau

Hors ligne

 

#3 27-05-2014 07:02:46

ragnart
Membre
Lieu: Pas-De-Calais - FRANCE
Date d'inscription: 26-01-2014
Messages: 24
Site web

Re: message d'erreur phpmyadmin

Bonjour Cristal,

en effet c'est vraiment "ballot" de ma part ! J'ai encore beaucoup à apprendre et devrait reffléchir avant de sortir mes idioties!
merci cristal


Pour recevoir, il faut savoir partager !

Hors ligne

 

Pied de page des forums

Propulsé par FluxBB
Traduction par FluxBB.fr