Gossamer Forum
Home : General : Databases and SQL :

SQL Statement problems...

Quote Reply
SQL Statement problems...
Mmm... got a bit of a funny problem here. The following SQL;

Code:
CREATE TABLE phpCalendar_Permissions(

AdminUserID bigint( 20 ) unsigned NOT NULL ,
LocationID int( 10 ) unsigned NOT NULL ,
Permissions smallint( 5 ) unsigned DEFAULT '0' NOT NULL ,
PRIMARY KEY ( AdminUserID, LocationID ) ,
FOREIGN KEY ( LocationID ) REFERENCES phpCalendar_Locations( LocationID ) ON DELETE SET NULL ON UPDATE CASCADE ,
FOREIGN KEY ( AdminUserID ) REFERENCES phpCalendar_AdminUsers( AdminUserID ) ON DELETE SET NULL ON UPDATE CASCADE
)

.. gives me this error when running;

Quote:
Can't create table './jose_forum/phpCalendar_Permissions.frm' (errno: 150)

Aparantly this is down to a "foreign key constraint not being correctly formed".

Anyone got any ideas why I may be getting this?

TIA

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] SQL Statement problems... In reply to
I believe that this error is related to an inproperly configured MySQL permission problem. I've seen this error a few times with my hosting company and for some reason the database permissions were changed not to include my username and password combination, only root admin could access the database.

Contact GT or your hosting company and ask them to fix it.
========================================
Buh Bye!

Cheers,
Me