View unanswered posts | View active topics It is currently Mon Dec 17, 2018 3:28 am



Reply to topic  [ 3 posts ] 
 CREATE VIEW in cPanel at SiteGround 
Author Message
Junior Member

Joined: Sun May 20, 2007 4:09 pm
Posts: 3
Post CREATE VIEW in cPanel at SiteGround
Hi, I'm completely new to PHP and MySQL and I'm using phpMyAdmin - 2.9.0.2 to create a view. I think my syntax is correct:

CREATE VIEW boston
SELECT * from contacts
WHERE city = 'boston'

but I get an error message indicating I don't have the correct privileges. This seems odd to me since I am the one who created the database! Do I have to assign myself greater privileges or log on under a different user name?

I can create and drop tables - why can't I create a view?

Ed Poor


Sun May 20, 2007 4:20 pm
Report this post
Profile
Junior Member

Joined: Sun May 20, 2007 4:09 pm
Posts: 3
Post Error message when trying to create a view
Error

SQL query: Image
CREATE VIEW v AS SELECT *
FROM `person`
WHERE ID >5
MySQL said: Image
#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 `person` WHERE ID > 5' at line 1


Sun May 20, 2007 4:56 pm
Report this post
Profile
Junior Member

Joined: Sun May 20, 2007 4:09 pm
Posts: 3
Post Need MySQL 5.0, have 4.1
vladimir_cz wrote:
looks like your mySQL engine don't support views as well.
http://dev.mysql.com/doc/refman/5.0/en/create-view.html


Thanks, Vladimir. The man at SiteGround said the same thing. I'll have to upgrade, or just write my code without views.

Ed


Mon May 21, 2007 3:17 pm
Report this post
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.