Forums

How Wordpress Generates Primary Keys (1 post)

  1. ottobonn28
    Member
    Posted 3 months ago #

    Hi,

    Does anyone know how WordPress generates its primary keys for things like links and link categories? I'm looking to do something similar, which involves joining two database tables with a linking table (a many-to-many relationship). The tables each have single primary keys. The problem is that the keys are automatically generated with MySQL's AUTO INCREMENT facility, so it's hard to know what key the database assigns. Since this is very similar to the way WordPress handles links and categories, I was hoping someone knew how WordPress does it.

Reply

You must log in to post.

About this Topic