![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 8 Pomógł: 0 Dołączył: 10.06.2003 Skąd: Kielce Ostrzeżenie: (0%) ![]() ![]() |
mam zrobic projekt bazy szkoly i wyskrobalem cos takiego:
use Szkola; create table nauczyciele ( nauczycielid int unsigned not null auto_increment primary key, nazwisko char(30) not null, klasaid int unsigned not null ); create table uczniowie ( uczenid int unsigned not null auto_increment primary key, nazwisko_ucznia char(30) not null, klasaid int unsigned not null ); create table klasy ( klasaid int unsigned not null auto_increment, nr_klasy char(5) not null, nauczycielid int unsigned not null, uczenid int unsigned not null, przedmiotid int unsigned not null, primary key(klasaid, nr_klasy) ); create table przedmioty ( przedmiotid int unsigned not null auto_increment primary key, nazwa_przedmiotu char(60) unsigned not null, nauczycielid int unsigned not null, uczenid int unsigned not null, klasaid int unsigned not null, ); tylko dupa zbita bo wyskakuja mi bledy i nie wiem o co kaman... |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Przyjaciele php.pl Postów: 7 494 Pomógł: 302 Dołączył: 31.03.2004 Ostrzeżenie: (0%) ![]() ![]() |
:arrow: Popraw posta, używając BBCode, będzie czytelniejszy
:arrow: Napisz jaki błąd ci wyskakuje. |
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 133 Pomógł: 0 Dołączył: 15.09.2003 Ostrzeżenie: (0%) ![]() ![]() |
1.Przy zakładaniu ostatniej tabeli masz znak przecinka po ostatnim polu - usuń go.
2. Przy polu 'nazwa_przedmiotu' wywal UNISIGNED w tablicy przedmioty |
|
|
![]()
Post
#4
|
|
Grupa: Zarejestrowani Postów: 8 Pomógł: 0 Dołączył: 10.06.2003 Skąd: Kielce Ostrzeżenie: (0%) ![]() ![]() |
no wiec tak przy pierwszych trzech tabelach jest wszystko ok dopiero przy ostatniej czyli:
[sql:1:f2e8e4c828] create table przedmioty ( przedmiotid int unsigned not null auto_increment primary key, nazwa_przedmiotu char(60) unsigned not null, nauczycielid int unsigned not null, uczenid int unsigned not null, klasaid int unsigned not null, ); [/sql:1:f2e8e4c828] wyskakuje mi cos takiego: " ERROR 1064: Yuo have an error in your SQL syntax. Check the manualthat corresponds to your MySql server version for the right syntax to use 'unsigned not null, nauczycielid int unsigned not null, uczeni mysql> " jesli moesz to popraw co trzeba bo ja poczatkujacy bazodanowiec... |
|
|
![]()
Post
#5
|
|
Grupa: Zarejestrowani Postów: 8 Pomógł: 0 Dołączył: 10.06.2003 Skąd: Kielce Ostrzeżenie: (0%) ![]() ![]() |
po usunieciu przecinka wyskakuje ten sam blad...
|
|
|
![]()
Post
#6
|
|
Grupa: Zarejestrowani Postów: 133 Pomógł: 0 Dołączył: 15.09.2003 Ostrzeżenie: (0%) ![]() ![]() |
Wszędzie gdzie masz pole CHAR usuń UNSIGNED.
|
|
|
![]()
Post
#7
|
|
Grupa: Zarejestrowani Postów: 8 Pomógł: 0 Dołączył: 10.06.2003 Skąd: Kielce Ostrzeżenie: (0%) ![]() ![]() |
Thx wielkie ;]]] masz bonusika ode mnie Dawid (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif) pozdrawiam i polecam sie na przyszlosc ;>
|
|
|
![]()
Post
#8
|
|
Grupa: Przyjaciele php.pl Postów: 2 335 Pomógł: 6 Dołączył: 7.03.2002 Ostrzeżenie: (0%) ![]() ![]() |
Prosze poprawic temat na zgodny z regulaminem.
|
|
|
![]() ![]() |
![]() |
Aktualny czas: 24.08.2025 - 21:53 |