Schema Challenge…

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
AaronSmith
Forum Commoner
Posts: 32
Joined: Fri Mar 28, 2003 3:14 pm

Schema Challenge…

Post 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!
qartis
Forum Contributor
Posts: 271
Joined: Sat Dec 14, 2002 4:43 pm
Location: BC, Canada
Contact:

Post by qartis »

You can't give source an SQL statement, try using the CLI to mysql instead, or phpmyadmin, if you have it.
AaronSmith
Forum Commoner
Posts: 32
Joined: Fri Mar 28, 2003 3:14 pm

before...

Post 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?
qartis
Forum Contributor
Posts: 271
Joined: Sat Dec 14, 2002 4:43 pm
Location: BC, Canada
Contact:

Post by qartis »

I'm not too sure, I usually use phpmyadmin, not too much mysql from the command line
AaronSmith
Forum Commoner
Posts: 32
Joined: Fri Mar 28, 2003 3:14 pm

fixed

Post 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.
Post Reply