Proźba o zrobienie zapytania do bazy danych


(Avaster12) #1

witam proszę was o zrobienie zapytania do bazy danych bo plik install nie tworzy zapytań w bazie nie wiem dlaczego więc proszę was o zrobienie prefiks bazy to dle

pobrane z pliku install.php

$tableSchema[] = "DROP TABLE IF EXISTS " . PREFIX . "_user_creatplaylist";


$tableSchema[] = "CREATE TABLE " . PREFIX . "_user_creatplaylist (

  `id` int(10) NOT NULL auto_increment,

  `name` varchar(200) NOT NULL default '',

  `image` varchar(350) NOT NULL default '',

  `key` varchar(350) NOT NULL default '',

  `desc` varchar(350) NOT NULL default '',

  `member` varchar(200) NOT NULL default '0',

  `allow_comm` tinyint(1) NOT NULL default '1',

  `allow_rate` tinyint(1) unsigned NOT NULL default '1',

  `approve` tinyint(1) NOT NULL default '0',

  `access` varchar(150) NOT NULL default '',

  `count` int(10) NOT NULL default '0',

  `comm_num` int(10) NOT NULL default '0',

  `rating` smallint(5) NOT NULL default '0',

  `vote_num` smallint(5) unsigned NOT NULL default '0',

  PRIMARY KEY (`id`)

) TYPE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */";

(Pablo_Wawa) #2

Jeśli to baza MySQL, to użyj phpMyAdmin i tam wklej skrypt SQL do wykonania:

DROP TABLE IF EXISTS dle_user_creatplaylist;


CREATE TABLE dle_user_creatplaylist (

  `id` int(10) NOT NULL auto_increment,

  `name` varchar(200) NOT NULL default '',

  `image` varchar(350) NOT NULL default '',

  `key` varchar(350) NOT NULL default '',

  `desc` varchar(350) NOT NULL default '',

  `member` varchar(200) NOT NULL default '0',

  `allow_comm` tinyint(1) NOT NULL default '1',

  `allow_rate` tinyint(1) unsigned NOT NULL default '1',

  `approve` tinyint(1) NOT NULL default '0',

  `access` varchar(150) NOT NULL default '',

  `count` int(10) NOT NULL default '0',

  `comm_num` int(10) NOT NULL default '0',

  `rating` smallint(5) NOT NULL default '0',

  `vote_num` smallint(5) unsigned NOT NULL default '0',

  PRIMARY KEY (`id`)

) TYPE=MyISAM;

i wykonaj.


(Avaster12) #3

jak instaluje cmsa dle to ama taki błąd

The Error returned was: 

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 'TYPE=MyISAM /*!40101 DEFAULT CHARACTER SET latin2 COLLATE latin2_general_ci */' at line 17

CREATE TABLE dle_category (

  `id` smallint(5) NOT NULL auto_increment,

  `parentid` smallint(5) NOT NULL default '0',

  `posi` smallint(5) NOT NULL default '1',

  `name` varchar(50) NOT NULL default '',

  `alt_name` varchar(50) NOT NULL default '',

  `icon` varchar(200) NOT NULL default '',

  `skin` varchar(50) NOT NULL default '',

  `descr` varchar(200) NOT NULL default '',

  `keywords` text NOT NULL,

  `news_sort` varchar(10) NOT NULL default '',

  `news_msort` varchar(4) NOT NULL default '',

  `news_number` smallint(5) NOT NULL default '0',

  `short_tpl` varchar(40) NOT NULL default '',

  `full_tpl` varchar(40) NOT NULL default '',

  PRIMARY KEY (`id`)

  ) TYPE=MyISAM /*!40101 DEFAULT CHARACTER SET latin2 COLLATE latin2_general_ci */

(Pablo_Wawa) #4

Przyjrzyj się ostatniej linii (nr 17) - czy ja Ci podałem ją razem z komentarzem “/*!40101 …”?


(Avaster12) #5

tamten błąd był po zainstalowanu strony a to z phpmyadmin

#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 'TYPE=MyISAM' at line 17

(Pablo_Wawa) #6

Tu masz rozwiązanie: http://stackoverflow.com/questions/11471075/mysql-error-type-myisam