![]() |
|
#1
|
||||
|
||||
InnoDB FOREIGN KEY error!I was trying my hand at InnoDB tables and am having problems with FOREIGN KEYS!
PHP Code:
I am getting the error no. 1005 i.e. errno 150, that means a foreign key definition would be incorrectly formed. What could be wrong? ![]() __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#2
|
||||
|
||||
|
you forgot to set something in the table 'templatesets'
quote from MySQL.com Quote:
|
|
#3
|
||||
|
||||
|
Hello Allowee,
Thank you for the reply but I don't think I got what you were trying to explain. A sample correction would be nice __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#4
|
||||
|
||||
Re: InnoDB FOREIGN KEY error!PHP Code:
so your code will be something like. PHP Code:
at least you forgot an INDEX. thats why i put in the quote from MySQL.com |
|
#5
|
||||
|
||||
What is the difference between KEY and INDEX in MySQL?KEY is a synonym for INDEX.
Yeah, I didn't know that till about a month or so ago, so it's common to be NOT aware of this little detail. Here's some odd news: Today, just before getting online, I started my MySQL server and absent-mindedly brought this very page (containing the sql commands above) up and it WORKED! SO, either my MySQL server last night was screwy or there is a bug with phpmyadmin (since my first attempt trying to create the tables, was through phpmyadmin). I remember I was RELOADING MySQL all the time last night, after each change - yet nothing! The one thing I didn't do was to STOP and START MySQL. Perhaps that would have solved the problem immediately... I will try to see if I can re-create the problem so I can know for sure what caused it. __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
Recent GIDBlog
Last Week of IA Training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in | ukrspp21 | MySQL / PHP Forum | 31 | 04-Jul-2006 21:41 |
| Implicit Declaration error | mike3340 | CPP / C++ Forum | 1 | 16-Dec-2003 08:12 |
| error during program | rjd72285 | CPP / C++ Forum | 0 | 11-Nov-2003 18:49 |
| [script] E-mail webmaster error page | BobbyDouglas | PHP Code Library | 0 | 19-Aug-2003 20:10 |
| CD burner, focus or tracking error | ShingoDrrazz | Computer Hardware Forum | 1 | 09-Aug-2003 16:26 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The