Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: problem z tabelami w bazie
Forum PHP.pl > Forum > Bazy danych > MySQL
bilo22
oto co jest w plik sql:

CREATE TABLE `mygad_categories` (
`id` mediumint(9) NOT NULL auto_increment,
`name` varchar(40) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin2 AUTO_INCREMENT=10 ;

--
-- Zrzut danych tabeli `mygad_categories`
--

INSERT INTO `mygad_categories` (`id`, `name`) VALUES (1, 'Erotyczne'),
(2, 'Francuskojęzyczne'),
(3, 'Milość szczęśliwa'),
(4, 'Miłosne'),
(5, 'Niemieckojęzyczne'),
(6, 'Świąteczne'),
(7, 'Śmieszne'),
(8, 'Urodzinowe'),
(9, 'Wulgarne');

-- --------------------------------------------------------

--
-- Struktura tabeli dla `mygad_descs`
--

CREATE TABLE `mygad_descs` (
`id` mediumint(9) NOT NULL auto_increment,
`cat_id` tinyint(4) NOT NULL default '0',
`text` varchar(100) NOT NULL default '',
`time` int(11) NOT NULL default '0',
`author` varchar(30) NOT NULL default '',
`active` tinyint(1) NOT NULL default '0',
`pts` mediumint(9) NOT NULL default '100',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin2 AUTO_INCREMENT=15763 ;

--
-- Zrzut danych tabeli `mygad_descs`
--

INSERT INTO `mygad_descs` (`id`, `cat_id`, `text`, `time`, `author`, `active`, `pts`)
(12, 1, 'KoChaM cIe InIe MoGe ZyC bEz cIeBiE...ChCe ByC z ToBaa...', 1135876908, 'admin', 1, 100),
(13, 1, 'ChCe CzUc TwE rEcE nA mOiM cIeLe I tWoJe CiEpLO kAzDeJ nOcY!!!', 1135876908, 'admin', 1, 100),

co do pierwszej tabeli wszystko jest ok tworzy tabele i wpisuje do niej dane

druga tabela tworzy ja tez bez problemu schody zaczynaja sie dopiero po probie zapisu danych w tabeli drugiej
wyskakuje nastepujacy blad:

MySQL said: Documentation
#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 '' at line 5

There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem

nie wiem co jest nie tak pomozcie prosze
kossa
Utwórz 2 tabelę bez: ENGINE=MyISAM DEFAULT CHARSET=latin2 AUTO_INCREMENT=15763

Łukasz
bilo22
nadal wyskakuje mi ten sam blad juz kombinowalem na rozne sposoby i nic wciaz ten sam blad
SongoQ
A values gdzie?
bilo22
juz wszystko ok na koncu insert into wstawilem zamiast srednika przecinek
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.