![]() |
|
#1
|
|||
|
|||
New tophp/mysqlI am using phpMy admin to create my tables in my database. I want to use the type InnoDB and then declare foreign keys. I have assigned the type to InnoDB, how do I add the reference clause in phpMyAdmin?
If you can help me with this I would be very grateful |
|
#2
|
||||
|
||||
Re: New tophp/mysqlI don't know how far phpmyadmin [PMA] has come along lately, but the version I have [2.8.0.2] doesn't handle/support the foreign key (FK) manipulation directly through the GUI. I either have to use an SQL statment in a PMA SQL window, or at the MySQL command line to make FK adjustments.
Even though I do have FKs specified, my PMA version only detects/lists them as 'indexes'. You might be able to poke around PMA's website for more info. (unless another poster might have a better response) EDIT: I do have a newer version of PMA at home, (not sure what version) but I'll check what it can/'t do with FKs and I'll post again by Saturday. __________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#3
|
|||
|
|||
Re: New tophp/mysqlThank you, I will use the SQl window as you suggest, uless you come back with another solution!
|
|
#4
|
||||
|
||||
Re: New tophp/mysqlThe other version I have is 2.9.1.1, and it DOES support FK's! (now that I've found this, I need to double check my 2.8 version...)
When viewing a table's structure, there is a 'Relation view' link just below the list of fields, but before clicking the link... 1. The field(s) that you would like to become FK candidates must be in the 'Indexes' list (down a little more on the same screen). 2. For each candidate field, in the 'Action' column (far right), click the 'lightning bolt' [index] icon and it will add them to that indexes list. 3. Now click the 'Relation view' link. 4. A 'Links to' listing will appear, and you'll see three combo boxes next to all the entries that appeared in the indexes list: (the PK field(s) will appear too, but ignore them and only set the fields that will become FKs)
(oh, the save doesn't actually refresh the screen nor will it return to the previous screen Volia! ![]() __________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#5
|
|||
|
|||
Re: New tophp/mysqlThank you fro your reply.
|
|
#6
|
||||
|
||||
Re: New tophp/mysql(post #4 followup)...the 2.8.0.2 version supports FKs too!
__________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
Recent GIDBlog
First week of IA training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The