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?
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
Thanks, Vladimir. The man at SiteGround said the same thing. I'll have to upgrade, or just write my code without views.
Ed
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.