Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Tworzenie baz z pliku
wojtekr
post
Post #1





Grupa: Zarejestrowani
Postów: 13
Pomógł: 0
Dołączył: 15.10.2003

Ostrzeżenie: (0%)
-----


Witam, mam taki plik(dn.sql):
[sql:1:b469cd611e]
drop table if exists user;
create table user
( user_id int unsigned not null auto_increment primary key,
login char(10) not null,
imie char(30) not null,
nazwisko char(30) not null,
stanowisko char(30) not null,
plec char(1) not null,
stawkah float not null,
grupa char(10) not null
);

drop table if exists klient;
create table klient
( klient_id int unsigned not null auto_increment primary key,
nazwa_klient char (30) not null,
);

drop table if exists projekt;
create table projekt
( projekt_id int unsigned not null auto_increment primary key,
nazwa_proj char (30) not null,
opis_proj char (254),
status int not null,
);
[/sql:1:b469cd611e]
i przy próbie wprowadzenia:
Kod
mysql -u root -p -D dn < dn.sql


jest komunikat:

ERROR 1064 at line 13: You have an error in your SQL syntax near ')' at line 4
dzieki za pomoc
[/code]
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 1)
Jabol
post
Post #2





Grupa: Przyjaciele php.pl
Postów: 1 467
Pomógł: 13
Dołączył: 22.02.2003

Ostrzeżenie: (0%)
-----


try this[sql:1:3cf7d3803c]
drop table if exists user;
create table user
( user_id int unsigned not null auto_increment primary key,
login char(10) not null,
imie char(30) not null,
nazwisko char(30) not null,
stanowisko char(30) not null,
plec char(1) not null,
stawkah float not null,
grupa char(10) not null
);

drop table if exists klient;
create table klient
( klient_id int unsigned not null auto_increment primary key,
nazwa_klient char (30) not null
);

drop table if exists projekt;
create table projekt
( projekt_id int unsigned not null auto_increment primary key,
nazwa_proj char (30) not null,
opis_proj char (254),
status int not null
);
[/sql:1:3cf7d3803c]
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 20.08.2025 - 12:28