Creating Database Table vs. Adding MetaData to Post & User

While you might not be writing a plugin specifically, this resource will still be pertinent: http://codex.wordpress.org/Writing_a_Plugin#Plugin_Development_Suggestions From the codex Use the existing database tables instead of creating new custom tables if possible. Most use-cases can be accomplished with custom post types and meta data, custom taxonomy and/or one of the other standard tables and using … Read more

How many databases do I need?

Multiple installs can share a single database, as long as each install has a unique table prefix defined in wp-config.php before going through the install process: /** * WordPress Database Table prefix. * * You can have multiple installations in one database if you give each a unique * prefix. Only numbers, letters, and underscores … Read more

Should I use WordPress to skin a database website?

WordPress is an ecosystem of its own, and it’s pretty fat in terms of memory use and existing APIs and structures. Integrating this huge behemoth with a lean back-end that you have already built on your own won’t make much sense unless you specifically want to use WP’s back-end functionality instead of yours. WordPress themes … Read more

wpdb prepare insert table doesn’t work

I’m pretty sure that first SQL query isn’t correct SQL (insert has different syntax) 😉 It should be: INSERT INTO {$wpdb->prefix}awpcp_adphotos (ad_id, image_name, disabled, isprimary) VALUES (%d, %s, %d,%d) In second example, I’m almost sure that ad_id is not string, and image_name is not a number. Of cours I’m only guessing, because I haven’t seen … Read more