Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

How do I create a column in the ‘ Post Meta ‘ in PHP or plugin?

$
0
0

Replies: 1

How do I create a column in the ‘ Post Meta ‘ in PHP or plugin?

function new_column_postmeta() {

CREATE TABLE IF NOT EXISTS <code>wp_postmeta</code> (
  <code>meta_id</code> bigint(20) unsigned NOT NULL,
  <code>post_id</code> bigint(20) unsigned NOT NULL DEFAULT '0',
  <code>meta_key</code> varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  <code>meta_value</code> longtext COLLATE utf8mb4_unicode_ci
  <code>new_column</code> longtext COLLATE utf8mb4_unicode_ci
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

}

If anyone can create the function or point me a plugin I would be very grateful!

  • This topic was modified 46 minutes ago by manoodin.
  • This topic was modified 42 minutes ago by manoodin.
  • This topic was modified 35 minutes ago by manoodin.

Viewing all articles
Browse latest Browse all 59525

Trending Articles