cannot access new tables

Status
Not open for further replies.

Colony

New Member
Messages
11
Reaction score
0
Points
0
Whenever I create a new table I can't access it via php, however it works fine in phpmyadmin. This is the error I get when I try to access the database:

Access denied for user 'colony'@'localhost' to database 'SELECT * FROM terrain WHERE type='''

I can access all the other tables in the database, just not the new one I have created.
 

bugfinder

Retired
Messages
2,260
Reaction score
0
Points
0
perhaps because the user account you need to use would be say colony_<something> which you setup under the same database area?
 

Colony

New Member
Messages
11
Reaction score
0
Points
0
I accessed various other tables earlier in the php script, so that's not the problem. Any other ideas?
 

bugfinder

Retired
Messages
2,260
Reaction score
0
Points
0
colony'@'localhost' is not the normal way to connect to the db, normally you are going to use a given user you made, hence it would come as say colony_mydb@localhost or something

however..
(Ive been blind)

the error is correct..
Youve told to select a db, but put an sql statement in, not the name of the db.
 

Colony

New Member
Messages
11
Reaction score
0
Points
0
Thanks.
I have also been blind, i put myqsl instead of mysql_query.

It can be closed
 
Last edited:
Status
Not open for further replies.
Top