I am looking for code that correctly handles table creation for a plugin. wp_postmeta won't be the right thing for what I have in mind (my Primary key would be a WikiWord, for one thing).
I am looking for code that correctly handles table creation for a plugin. wp_postmeta won't be the right thing for what I have in mind (my Primary key would be a WikiWord, for one thing).
If you just want to add data to the wp_options table (which seems to be common practice), just read through this guide: http://codex.wordpress.org/Writing_a_Plugin#Saving_Plugin_Data_to_the_Database
I have only used three plugins that actually create database tables. They appear to create the tables upon activation and seem to require WP's upgrade scripts to do so. Here are the plugins:
http://www.ioerror.us/software/bad-behavior/
http://unknowngenius.com/blog/wordpress/spam-karma/dev/
http://uberdork.supertwist.net/2005/03/13/plug-it-in-plug-it-in/
thanks, I see the pattern to use now! cheers
This topic has been closed to new replies.