in reply to Re: Managing Inventory Sections with Perl and SQL
in thread Managing Inventory Sections with Perl and SQL
Hi, here's what I've got so far:
create table section ( section_id int(9) unsigned not null, section_name varchar(32), created datetime default '0000-00-00 00:00:00' not null, primary key (section_id) ); create table inventory_items ( item_id int(9) unsigned not null auto_increment, section_id int(9) unsigned, item_name varchar(32) not null, description varchar(255), photo_name varchar(255), created datetime default '0000-00-00 00:00:00' not null, modified datetime default '0000-00-00 00:00:00' not null, primary key (item_id), ); create table item_price ( item_id int(9) unsigned not null auto_increment, price decimal(11, 2), sale_price decimal(11, 2), valid_from datetime not null, valid_to datetime not null, primary key (item_id), );
I'm currently receiving an error "ERROR 1064 at line 8: You have an error in your SQL syntax near ')' at line 10." I'm running this from a file like so: mysql inventory < inventory.sql -u username -p I was receiving an error that said the same but at line 6 before, I removed the comma after primary key and it seemed to change the error - could this have something to do with whitespace/comma placement? I noticed in your example you placed the preceeding line's comma before the next statement.
Thanks! :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Managing Inventory Sections with Perl and SQL
by mpeppler (Vicar) on Jul 30, 2003 at 06:25 UTC |