Menu

Foreign Keys - MyISAM

Help
simsalabim
2010-08-03
2018-01-23
  • simsalabim

    simsalabim - 2010-08-03

    Hey,

    just tested adminer / editor and it worked out of the box, with the default editing stuff.
    But of course I'd like to have select-fields for foreign-keys. (MySQL - MyISAM)
    How do I set the foreign-keys manually for MyISAM ?
    I couldn't find an example with foreign-keys in the download.
    I did play around with the API-reference, but couldn't get it to work so far.
    Some examples would be helpfull. Is there an example-page out there, or could anybody give me a hint on this ?

    Thanks in advance !

     
  • Jakub Vrána

    Jakub Vrána - 2010-08-04

    There is currently no easy way to mimic foreign keys in MyISAM. The only way is to edit the foreign_keys function in mysql.inc.php file (source codes distribution) to return these virtual foreign keys.

    Consider switching to InnoDB.

     
  • simsalabim

    simsalabim - 2010-08-04

    Hey,

    thanks for the quick answer !
    I can't switch to InnoDB at the moment.
    Too bad there is no virtual FK possibility … :-)

    Anyway, nice tool !

     
  • Jakub Vrána

    Jakub Vrána - 2018-01-23

    There's now foreignKeys method that could be overridden.

     

Log in to post a comment.