Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Adding new tables to WP Database

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #43957
    lucas572
    Member

    Hi all,

    I’m looking to add a new table to the wp db for a project I’m working on. Without going into too much detail, I’m allowing users to submit a form that performs an off site search, returning the results back to that specific user. The searches and results will be stored (hopefully) within a new database table.

    But, I need to make sure each search and result set are given to the user that generated them. I was initially thinking of just adding new columns to the wp_user table, but after reading around, updating WordPress could potentially cause that data to get lost.

    So, my question is: Is there a way to link the data stored in one table to the user ID of the person that made it? Would it be as simple as just adding an ID field and wp will know what I’m on about?

    Thanks!

    #130999
    pixelgrid
    Participant

    doing it with a plugin would be the best way as your code could be transfered and maintained more easilly

    have a look to this link http://codex.wordpress.org/Creating_Tables_with_Plugins from the codex

    or find a plugin like this one http://breathingtech.com/2010/creating-database-tables-for-wordpress-plugin/
    that can generate a table for you

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Other’ is closed to new topics and replies.