Sponsored by NuSphere - PHP Software for PHP Application Developers - On Sale This Week for $100



Go Back   PHP-Editors > Linux, Apache, MySQL > MySQL Help

MySQL Help Post any question relating to MySQL here and hopefully someone can help

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2007-05-20, 06:20 PM
Junior Member
 
Join Date: May 2007
Posts: 3
Ed Poor is on a distinguished road
Default 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
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 2007-05-20, 06:56 PM
Junior Member
 
Join Date: May 2007
Posts: 3
Ed Poor is on a distinguished road
Default Error message when trying to create a view

Error

SQL query:
CREATE VIEW v AS SELECT *
FROM `person`
WHERE ID >5
MySQL said:
#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
Reply With Quote
  #3 (permalink)  
Old 2007-05-21, 03:29 PM
Senior Member
 
Join Date: Jul 2006
Location: Prague, Czech Republic
Posts: 193
vladimir_cz is on a distinguished road
Send a message via ICQ to vladimir_cz Send a message via MSN to vladimir_cz Send a message via Yahoo to vladimir_cz Send a message via Skype™ to vladimir_cz
Default

looks like your mySQL engine don't support views as well.
http://dev.mysql.com/doc/refman/5.0/en/create-view.html
__________________
Thank you. Vladimir, Czech Republic.
http://www.smartwebco.com/
I'm looking for job.
Reply With Quote
  #4 (permalink)  
Old 2007-05-21, 03:47 PM
Senior Member
 
Join Date: Jul 2006
Location: Prague, Czech Republic
Posts: 193
vladimir_cz is on a distinguished road
Send a message via ICQ to vladimir_cz Send a message via MSN to vladimir_cz Send a message via Yahoo to vladimir_cz Send a message via Skype™ to vladimir_cz
Default

looks like your mySQL engine don't support views as well.
http://dev.mysql.com/doc/refman/5.0/en/create-view.html
__________________
Thank you. Vladimir, Czech Republic.
http://www.smartwebco.com/
I'm looking for job.
Reply With Quote
  #5 (permalink)  
Old 2007-05-21, 05:17 PM
Junior Member
 
Join Date: May 2007
Posts: 3
Ed Poor is on a distinguished road
Default Need MySQL 5.0, have 4.1

Quote:
Originally Posted by vladimir_cz View Post
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
Reply With Quote
Must read Review for Serious PHP Developers


NuSphere PhpED 5.5 : The Staff of php-editors.com recently spent a few days working with NuSphere PhpED 5.5 (a popular PHP IDE) and NuCoder 2.0 (a PHP Encoding Utility), read up on all the details.

Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 11:10 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.