Jump to content

Foreign keys in mysql


skaterdav85

Recommended Posts

I have set up foreign keys in mysql via phpmyadmin. When i go and insert data into my main table, there are select menus for each FK, but the select menu only displays the PK of the related table. Is there a way to tell it to display another field instead of the PK just to make it easier for me to insert data?

Link to comment
Share on other sites

I doubt it... why are you inserting data manually via phpMyAdmin anyway?

Link to comment
Share on other sites

I doubt it... why are you inserting data manually via phpMyAdmin anyway?
bummer. i was hoping it would let me and it would be an easy way to get data into my database without me having to create an administrative section of my site for this. I guess I will have to just do that.also, do you know why the select menus for the foreign keys have the PK numbers listed like:-2-11-2-? not sure why they list it twice with the minus sign in front and in back...
Link to comment
Share on other sites

phpMyAdmin does have an SQL mode, where you can type in SQL directly.That helped me learn SQL, because I'd run the query using phpMyAdmin, then look at the SQL and change it to suit my needs.Now I just use the command line interface, mysql -uuser database -p.The command line has a good help system, which includes links to the documentation.

Link to comment
Share on other sites

im just trying to figure out a quick way to enter in a bunch of data into all my tables. i already know sql and i'd rather not write several insert statements. the best solution is probably to just create my own interface to do this.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...