Page 1 of 1

Schema Challenge…

Posted: Mon Jun 09, 2003 4:37 am
by AaronSmith
In my schema folder, I have a file named realestate.sql

That file contains the following code:

Code: Select all

create table realestate (
	ID int(11) not null auto_increment,
	Created int(11),
	Expires int(11),
	AuthorID varchar(32),
	Category int(11),
	Category2 int(11),
	Category3 int(11),
	object MEDIUMBLOB,
	primary key (ID)
);

create table realservices (
	ID int(11) not null auto_increment,
	Created int(11),
	Expires int(11),
	AuthorID varchar(32),
	Category int(11),
	Category2 int(11),
	Category3 int(11),
	object MEDIUMBLOB,
	primary key (ID)
);
At the prompt (bash-2.03$), I type source realestate.sql and get the following errors:

Code: Select all

bash: realestate.sql: line 1: syntax error near unexpected token `(‘
bash: realestate.sql: line 1: `create table realestate (‘
Any help on what I am doing wrong or where to find information regarding my mistake is appreciated. I am not certain what version of MYSQL I am running.

Thanks!

Posted: Mon Jun 09, 2003 5:09 am
by qartis
You can't give source an SQL statement, try using the CLI to mysql instead, or phpmyadmin, if you have it.

before...

Posted: Mon Jun 09, 2003 5:28 am
by AaronSmith
This has worked when I've done it in the past, exact same code as far as I can tell.

What are your thoughts on that?

Posted: Mon Jun 09, 2003 5:49 am
by qartis
I'm not too sure, I usually use phpmyadmin, not too much mysql from the command line

fixed

Posted: Tue Jun 10, 2003 3:08 am
by AaronSmith
I was able to get it working. Our server has a security protocol that requires you to be logged in twice. I wasn't.