create view in mysql 4

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
milleusi
Forum Commoner
Posts: 30
Joined: Mon Jun 13, 2005 3:18 am

create view in mysql 4

Post by milleusi »

i wish to make a simple interogation in mysql 4.1.14-standard-log like this
create view v as select * from table1

and i get the folowing error:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VIEW v AS SELECT * from table1' at line 1
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Views weren't added until MySQL 5.
milleusi
Forum Commoner
Posts: 30
Joined: Mon Jun 13, 2005 3:18 am

Post by milleusi »

in this case all i have to do is to use multiple selects in same interogation? this is not too much for the server? i need to make a join between 6 tables

eny ideeas......pls pls pls
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Joining across six tables is often quite intensive for servers. Look into doing subqueries, which may be a bit less intensive. You could also look at temporary tables.
milleusi
Forum Commoner
Posts: 30
Joined: Mon Jun 13, 2005 3:18 am

Post by milleusi »

this could be the source of "Too many connection" error?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Too many connections! :) Seriously. If your database is shared across several domains on your server, that can definitely happen.
Post Reply