in reply to Relation between tables

hmm, that seems like an awful lot of words to ask a very straight-forward question ;)

The answer is basically yes. Get rid of the redundancy and use table joins to construct your queries. I'd suggest naming the foriegn key field in the plugin table "core_id" rather than "id_ref", so that's it's absolutely clear what it refers to.

Also, don't forget to use placeholders when you construct your queries in Perl.

Cheers,
Darren :)

Replies are listed 'Best First'.
Re^2: Relation between tables
by Ace128 (Hermit) on Jan 11, 2006 at 07:35 UTC
    :)
    But I wasnt sure Way #2 was the BEST solution. And I wanted some feedback and thougts on this by experts! :)
    Oh, and I forgot to say... wanna keep the queries as simple as possible, so it works in mySQL, SQLite and postgre! :)

    Joins? Seems to be working without the JOIN sql statement...
      Just because you don't implicitly use JOIN in your query, doesn't mean you aren't joining tables.

      "plugin.id_ref = core.id" is a table join.